As pointed out, you can't gift games that have been added to your library.
What you can do going forward, is when buying a game, click the box that says it's a gift, and then when checking out you'll get the choice to send it to someone or to store it in your inventory.
If you store a game in your inventory, you can later add it to your library, or send it to a friend, so you retain the choice.