here is what i would do.
get someone from the house to play the "passer by" of the gate. have them go outside 10 minutes or so before hand so that the dog doesnt know who will be walking by. (if your gate is easily seen through this may not work anyways, so you might need to rercruit someone to help)
have the person walk by - and go back and forth in front of the gate. it is YOUR job to walk in front of your dog, and claim the area next to the gate. you do this by simply standing in front of the gate facing your dog. and whenever the do charges the gate, YOU get between the dog and gate yourself.
you MUST stay with the exercise until the dog moves backwards away from the gate and stops barking. once that happens you yourself move from the gate.
if the dog goes back to the gate you must repeat the process until the dog surrenders to the exercise.
i did this with my dog a few times when he barked at squirrels in the backyard. i simply stood between him and the glass door, and pointed away into the house. when he turned and moved, i left. it only took a few reps and he doesnt do it anymore.
it worked for me, so give it a shot.
and good luck