This ability to speak differently to different groups is referred to as "codeswitching." I don't think it's exclusive to the gifted, though that probably helps you to be better at it. Anyone who has grown up speaking nonstandard English but who speaks standard English in the work world does it all the time.