I pre-purchased Bioshock Infinite. Along with this, I received Bioshock and X-Com. Both I have already. On the store-page it says for both games:
Already own it on Steam? Gift it to a friend
How can I gift this to a friend then?
Any games you receive additional copies of will appear in your Steam Inventory. You can access your Steam Inventory by clicking on the View menu followed by Inventory, or clicking on the 'envelope' on the Steam titlebar;
This will bring up your Steam inventory;
From here you can select any item and send it to a friend, either by using their Steam account name or email address.