You can't really know unless they offer some satisfactory proof but even legit sellers might not want or be able to provide you some. You could ask for a receipt or something but they're not always necessarily 'bought'. If people are selling you a gift code for 50% of its value they almost certainly got it some other way. Now, that's not to say it was obtained illegitimately as you can earn them in certain circumstances, but without any proof of where it came from you'll have to decide whether the heavy discount is worth taking the risk.
That's a real shame I wanted to see if I could trust a few people ad buy some gift cards for a little cheaper with Bitcoin but I don't I will because of this problem.
Thing is, the risk is simply too high! Even if you saved a couple percent, how high is the risk of this being a scam? If you believe the risk is too high, you might very well be better off paying the regular price and be sure to receive your merchandise!