Mmm, my horse used to do the same but not as bad with gates.. wouldn't go near it.
If I were you I'd...
Growl and tell him to get up! If that doesn't work, squeeze at the same time as growling, if that doesn't work growl, squeeze, kick. If that doesn't work... Growl, squeeze, kick then use the end of your reins to whack him on the side of the neck/upper shoulder. Be sure to use 'phases' so that next time or the time after that you don't have to get so 'firm'. Do this until he stands still.
Once he stands still pat him and praise him heaps!! I'd just stand him there till he's settled down.. and retreat, go away for a while or the rest of the ride.
Then next time you might want to 'push' it further.. once you've gone through all that and relaxed at the end etc.. then try to get one step forwards.. over the 'boundary' that you horse has set in his mind. And then relax again.
If you really need to get over the 'boundary' then once they've taken the step over the 'boundary' then you could get off and lead him the rest of the way.
Hopefully that helped some, that's just what I'd do, others will have another way, but do what ever works for you and your horse..
Oh and I know it will take a while but in the end if your horse goes to back up.. you'll just be able to 'growl' and he'll go ohh... ok and stop.