Just a suggestion...
1. Take working battery from car outside of gate and put into car inside of gate.
2. Start car inside gate and drive to outside gate where other car is.
3. Put batteries back in appropriate cars
4. Position cars side by side so you can now connect jumper cables and charge dead battery
Of course this assumes that these are similar batteries. If not, please see above suggestions by the other fine members of gfy.
