You only have the legal obligation to take reasonable due diligence to make sure the person who purchases the gun from you is legal to do so. If they turn around and conduct a "straw sale" then they are the one with culpability. When they said, "its a gift." that is really all you needed to say, and in fact you should/could have told them to shut their pie hole.
Now... what is "reasonable due diligence" is open to legal interpretation and a sufficiently assholish lawyer could still screw you up. But they could/do do that anyway, the rash of lawsuits by victims of shootings who sue the person who sold the shooter the gun, even if they were perfectly with rights to do so and so on.
This was a hypothetical situation. Although I have had people TRY to buy from me and mention that it would be a gift. I've also noticed ads here recently mentioning looking for guns to give as gifts.
I've been REALLY picky lately on who I sell/buy anything to/from.