I had this happen with my old mare. Very barn sour when I bought her where she wouldnt even come close to humans.
She did the same thing when I left the barn. It takes time for her to get use to it. Keep it up and she will know the more you go out that when she acts up your not going to freak out about it and take her home. She will eventually stop. Always keep her at a walk on the way home even if your fighting with her the whole time! It might take a couple weeks or so.
And I agree with Elana! That is a great idea to do as well!
I would first work your horse in circles on the ground then get on and head out for a couple hours. I was always gone for 2 to 3 hours each time. And she got very good at the end. Wasnt even scared of cars or crossing highways etc.