I agree with Twiglett's approach and similar suggested by others.
Five is a good age to sort this out, as much bigger and she'll be hard to bodily carry out - kicking and screaming if necessary.
As this has become such a problem for you I would start a new regime with 'rewards' for leaving peacefully and agreeably. So before you go to the park (or wherever) talk to her about leaving. Tell her the warnings you are going to give her, and show her the sticky bun (or whatever) that she will get to eat in the car afterwards if she leaves nicely without a fuss when you say. Chatting about these situations when they are not happening can be very helpful. Explain to your child that everyone feels sad when it's time to leave somewhere, but that's the way it has to be.
Make sure you stick to your guns and go when you say you are going to. Quite often children who prevaricate about leaving have parents who often prevaricate too! And don't give her the reward unless she earns it.
When you are safely in the car say to her either "well done - it makes me so happy when you follow my instructions, here's your special reward" or "I feel sad because we had a trauma again leaving XYZ. I hope next time we will do better so that you can have a reward."
Also, verbalise your own thoughts and feelings as this can help children understand their own.
"I know we are leaving in two minutes, so I'm just getting all my things together. I'm putting all the things back in my bag, and checking I've got my car keys handy. I've had a really lovely time here today, and I'm sad now that it's time to leave. But I know it's OK because everyone has been so well behaved we'll be able to come here again very soon." etc.