I have a 27 year old mare who has done this for the past 10 years. I’ve tried all kinds of tactics to break her of the behavior, and although it’s now manageable, it will never go away. My mare has always been a hot, anxious horse who is the alpha of the herd. She worries about her group. Is your mare turned out first? I’ve found this is very important, as if wanting to get to the other horses is the issue, then this eliminates it. If your mare is motivated by treats you might want to try giving her a treat part way to the gate and then get her attention with another before she starts to get to nervous about going through the gate. Another question is, how is she in her stall? Is she still on edge?