You cant have your horse avoid the problem all the time. Avoiding a problem will make a horse worry and make the problem become even more bigger, therefore, controlling your horse will be more difficult in an almost similar situation.
When starting to take her to the gate, first try leading her through it. If she will not go through, lunger her around a few times in both directions before lunging her through the gate. If she doesn’t go through he gate when you try to lunge her through it, you put some pressure on her by tapping her butt with a stick (not whipping). If she takes a step foward stop tapping and take the pressure off and rest for about 3 seconds. Then do that all over again until she is through the gate.
Next time you try to take her through the gate, first try to lunger her through it. If she will not take a step through the gate after tapping her, increase the tapping a little harder until she takes that step.
If she is scared of that gate by acting kind of spooky, big eyed, nervous, then, just take her up to it slowy until she calms down. Pet her when she is smelling the gate and is not spooky and etc.
It may take a little bit to get her there but its all worth it. I hope this helps!