What a great question.
What I have found helps young children is to give them both a prep before we see people and some options. "Auntie is coming over soon. When she comes in, it's your job to look at her eyes and say 'hi'. Let's practice." (you can do this with puppets and dolls, which gives the child more emotional space from the situation.)
If this is hard for her, give her a nonverbal option. "When we see Auntie, it's your job to say hi to her or to give her a little wave. Then you may go play."
It's not uncommon for more sensitive, observant children to not want attention focused on them. I've heard of several birthday kiddos who did not, under any circumstance, want Happy Birthday sung to them. I also think it's okay to have a small birthday for children this age, with just a few family/friends over. It's often 'too much', even for very social little kids.
Overall, the best things you can do are to keep reminding her *every single time* what is expected. When she does growl, be firm. "Stop now. This is a time to be friendly." and then give the option "If you choose not to be friendly, you may be quiet." This is reasonable for this age. You don't need to punish, either, just remind her a lot what is appropriate.
Lastly, one thing that comes to mind is how do you respond to this? Some kids WILL act out (growl, scowl, etc.) when they know they're going to get attention from the parent for this negative action. So be sure to prepare your daughter with your very simple expectations, correct her firmly, and don't let it take away from YOU connecting with the visitor. But do not overfocus on her behavior or harp on it. At home, when she growls, you can send her to her room until she can be friendly. That is the rule at our house-- a grumpy attitude means you can go take a break and come out when you are ready to be polite. (one can air grievances or be sad, but just being a stinker doesn't fly... you go do that in your room.)