I do not really understand any of this!
Why, if you are handling a horse, do you have it 20 to 40 feet away from you? There is no way to correct or control with this. Hence the reason why she trotted past you out of the gate. Had you had her on a short rope the moment she started to walk ahead you could have corrected.
Never run towards a horse that has done something wrong as in this situation.
Once back inside the gate why hobble?
A horse is not going to understand why it was put back because it took longer than 19 seconds to correct.
Have the horse on a short rope, lead it out the gat and make it wait before allowing it to graze - if it tries correct and make it wait. This way it understands it is not to eat unless allowed to.
Yes, you should always follow through but a horse needs to understand what is wanted of it and, being at the end of a long rope or loose is not going to teach it. This can happen but only after the horse has both a strong bond and trust in the handler.