I'm also this way. I can talk to my friends, do crazy things and be totally comfortable (usually) around them, yet I'm afraid of talking to an aunt or uncle.
I HATE family gatherings, I spend most of my time in my room and only come out to say an awkward hello because my dad makes me. I'm not close to my cousins so I barely speak to them. I barely even talk to my own sister, we're just really different and she's kind of a rude person so she makes me nervous, idk.
I also just feel awkward around my parents, too. Like, if I'm at a store with my mom and I see someone I know, I can't talk to them in front of my mom because I feel really nervous, or if the check-out lady tries making small talk, I'll just sort of nod my head because I don't want to talk in front of my mom. However if I'm alone at a store I can talk to them just fine, well, as fine as a person with anxiety can. I don't know, my anxiety seems to choose certain situations and people that I'm nervous around.