There's been lots of discussion on this in the past but generally, lots of horses do this.
Reward good behavior and make them work harder when they have undesirable behavior.
We trail ride most every weekend and even at the places she hasn't been before she seems to sense when we're headed back toward the trailer.
I've tried several things and can't say I've had consistent success.
What I've been doing lately is instead of getting off when we get to the trailer I ride past it, then around it a few times, then back onto the trail and back to the trailer and repeat. I stop away from the trailer and loosen her girth and let her stay there for a few minutes before walking her to the trailer.
Some times I don't get the impatience at the end of the ride and have to admit, some times she still tightens the reins and tries to speed up at the end. I don't ever let her win and make her go slower when she does it.
My first suggestion is don't un-tack her at the barn and end your ride somewhere other than the barn. Also, after you end the ride leave her tacked up for 15 or 20 minutes. My theory is she probably thinks works over when she gets to the barn. So, make her work harder at the barn and by ending the ride at different places she really has no "happy place" to go to. Leave the tack on and there's no instant relief either.
Good luck, maybe someone more successful than I will chime in.....
For we wrestle not against flesh and blood, but against principalities, against powers, against the rulers of the darkness of this world, against spiritual wickedness in high places.