A straw purchase is when a gun is purchased on behalf of someone else. The person buying the gun isn't using their own money, or the person they're giving it to has traded them something of value.
A gift doesn't involve an exchange of reciprocal value. In other words, I can legally take you into a gun store, let you shop, buy the gun for you, then hand it to you. In practice, a gift purchase is almost always when the recipient isn't there, because it looks like a straw purchase.
Ironically, if you take someone shopping to buy them a gun as a gift, by law you're the one that's supposed to have the background check run - not the recipient. Almost all FFLs will deny the sale if you tell them that you're buying it as a gift for someone who is present at the time, and there is no easy and legal way to run a background check on the intended recipient.
If memory serves, a cop was convicted a few years ago of a straw purchase after buying a "blue label" (police discount price) Glock for someone else. That person gave the cop the money, the cop bought it, then gave it to the person. The actual buyer in that case was not a prohibited person, and the straw purchase itself was the only crime committed.