As with any other purchase, make sure the check box that says "Make this a gift order" (or whatever) is checked on the checkout page before you go through with the payment.
But remember, buying as a gift will pull the game from the whole pool, rather than just what you don't own.
GOG has already converted the unwanted games from my Mystery Game purchases into gifts, but as the sale goes on I expect their backlog of such requests will increase.
i had lots in last pinata promo, there were loads of 3d games, thats the chance you get when loads of games are 3d/3d fpp
for now i have had my share of converted buys to gifts, already gave some away a while ago, starting to look like a santa claus in training :D