I agree with Brandy. Tell stories, using a name not hers at first. During this story ask her how the child might feel and what would she suggest that this child and/or parents do. If she doesn't want to be a part of telling the story, you tell the story using words to describe how you think she might feel. Make the story about some other little girl. If she chimes in with something like, "that's like me" ask her to talk about how they're alike. The idea is to get her talking about the incident and her feelings. You're giving her a sense that this is safe to talk about.
Depending on her age you might actually make a "book" together with you writing the story and her drawing pictures.
Above all do not say anything like, there's nothing to be afraid of. Be sure to reassure her that her feelings are OK and then eventually help her to find a way to feel safe again.
If she's young enough, and small enough, you could try picking her up and carrying her thru the doors. Not to force her to go but to reassure her that you are in charge and will protect her. She can totally depend on you while both of you go thru the doors.
I would stay away from elevators for awhile. Later, after she's comfortable with other doors, you could try using the elevator. If she's still scared, find an elevator that is seldom used and spend time opening and closing the doors. Then ask her if she'd like to try going up or down one floor.
Give her as much power as you can based on her age. Fear is caused by feeling powerless. She needs to be reassured about having power for herself and that she can trust you to understand and protect her.
You could also talk about how you felt while trapped in that elevator. Some adults think that they shouldn't let children know that they also feel vulnerable or scared when the opposite is true. Children need to know that feelings are normal and by seeing the adults in their lives manage their feelings they learn how to manage their own.