I'm no pro, but we have had similar problems with "barn sourness" (You probably know what being barn sour is, but I'll tell it anyways: It's when the horses stand at the barn and won't leave the gate. Very frustrating.) In a clinic that we were in, this is how the trainer explained how to help the horse to get over it:
The reason why the horse stands at the gate is because he has learned that the gate, (or barn) is his place of rest. For example, you had him standing still and resting while you were chatting with your friends over the gate right? Well, if he goes back out to the pasture, you're going to have him work again, so maybe he'll just try standing there at the gate and not have to work. Sounds like a good deal for him right? In order to try to change that mindset, if he won't leave the gate, work him there with trotting, changing directions, trotting again, don't let him stop there at the gate, but keep him moving until he gets a little bit tired of doing that work, then go out and let him stand and relax in the pasture; make that his spot of rest instead of the gate. It takes consistency, often multiple times of working on it, and PATIENCE, but it will help.
Make sure you don't always stop in the same spot in the pasture, and keep in mind that you don't always have to stop, walking is much easier than trotting, so just slowing from the trotting at the gate to the walking in the pasture is a reward. Remember also that you're not there to nag your horse, you want to help him learn, and keep a positive attitude. Reward the good, and don't expect him to change if you won't work with him consistently and patiently.
That's just my suggestion. :)
A horse in hand is worth a herd in the hills.