I bring in my two together. Fortunately i dont have to worry about other horses trying to get out as i only have two but i do have to shut gates.
I have one oldie and one youngster. I always go to the youngster first generally as he is more sticks his nose in everything, or comes to see me first. But does have a tendency to be cheeky and run off at times. So i put the head collar on him and drap lead over his neck and leave him, whilst i go get my oldie. The youngster will quite often follow me and comes over to join me whilst i put the headcollar on oldie. So i then am able to just lead them across the field together.
Youngster is a lively sole and wants to please but is also over enthusiastic, he quite often wants to get in front. So i find i have to ask him to back up. He has become quite responsive to this now. So if whilst im opening the gate or taking down the electric fence whilst holding him, i will often tell him to back up.
Mine will also naturally yield there quarters when they see the gate coming towards them. I will also say 'swing round' if they are slow on the up take. Usaully 'back up' if they are too close with the chest. Just something that just says move your in the way. Just be consistent with your words, and practice. If the horse wont back up. Use your hand on the front chest and gently push back, and say back up. As soon as the foot lifts to go back release the hand from the chest. Then hand on again for another step back and release. Eventually the horse will learn that you saying back up means they do just that. Exactly the same thing applies to the yielding there back end over. Hand on, speak and release as soon as they start to yield. They will over time also get quicker at it.
Once the horse learns these two things it gives you time and space to then be able to shut a gate once there lead through. The back up is unnatural movement for the horse (as it is for us) so they do have to think about it, but it also teaches them to respect your space and stops them flattening you.