Were you gifted the game through steam? If not, where was it purchased?
Anyway, in general, I don't think I've heard of anyone getting a steam-ban for registering a key that didn't belong to them (i.e. that someone else had a proof of purchase for, and hadn't given the key to person using it), but if someone else presents their proof of purchase for that key to steam when they aren't able to register it, the game would probably get pulled off your account.