gameon: You get a code from someone else and enter it here:
https://www.gog.com/en/gift/
If you want to send a code to someone else, you add the game "to your cart", but instead of buying the game, you would click gift.
You can either send the gift to your own e-mail address and copy the code to give to someone else for them to redeem. Or you can enter the persons e-mail address and send the code to them that way.
Mark this as your solution, it's exactly right. The benefit of using an extra email address is that you can send the code along in a PM w/o having an email address and buy during a sale but gift later on.
Finally, be wary, if you buy multiple games as a "gift" you get one code that redeems them all at once. So if you have multiple recipients make sure to make multiple purchases.