I dug through the relevant support pages and found some information for you.
Short version: Don't accept things you weren't expecting from people you don't know.
The Steam Support page on trading and gifts says...
[...] a gift sent to your account has been revoked. The most common reasons this will occur are:
- There has been a purchase error with the game you were gifted
- The purchaser has filed a dispute over the purchase
- The gift purchase was made using a fraudulent payment method
If you believe there has been an error, please contact the person who sent this gift.
The subscription to the gifted game is no longer valid. If you wish to continue playing the game without losing any game progress, you will need to purchase the game through Steam.
Warning: Never accept a gift from someone you do not know.
Meanwhile, a few pages away...
Redeeming Fraudulent Gifts
Never accept a gift from an unknown user. Any accounts tied to a redeemed gift from a
fraudulent source may be suspended.
In summary: You can either lose the game you were gifted, or possibly your account, depending on the whim of the Steam Gods handling your case. Expect the worst, because they tell you clearly in both areas don't accept things you weren't expecting from people you don't know.
Ask the person trying to gift or trade you the game to identify themselves, and reject the gift if anything seems suspicious. Better to lose a "free" game than your account, ne? If it turns out to be a friend or just someone who feels like gifting you stuff, ask them to send it through their real account, instead.