My 29 month old DS did this with his paternal grandparents. He would say "No! Bad Granny! Bad Poppa!"
and tantrum when he saw them. They would make a big show of it, acting all hurt and offended, which just made it worse. The more they tried to engage him, the worse it got. Now, if they just basically ignore him when he first comes over, or are very subdued in their greetings, he will come to them, and be very happy to see them. He is just a guy who needs his space for a bit, just like his mama
I remember being like this as a child, it was almost a power/control thing for me, also, I didn't like a lot of fuss with being greeted by relatives. It made me feel shy and self concious.
I don't know if any of this helps, but I think your son's behaviour while unpleasant is pretty normal, and maybe if your family didn't greet him right away or gave him his space for a while things might turn around. Tell them this is a normal phase and it will pass, just don't give it a lot of attention.