Is gregariousness a genetic trait?

Yes, at least in part. The latest evidence is in a study published in the Journal of Neuroscience.

Stanford University researchers looked at 14 young adults with a genetic condition called Williams syndrome and 13 without the syndrome. People with Williams syndrome generally have poor visual-spatial skills – they would have trouble, for example, drawing a bike – but are abnormally good at recognizing faces and are often far more extroverted than normal.