depends if you used it already, if you did then no you can't gift it anymore
If you didn't use it then you should be able to just gift it to whoever.
I haven't, I've gotten an invite that told me to download it in steam like a month ago, never installed it.
"CONGRATULATIONS!
YOU HAVE BEEN INVITED TO PLAY DOTA 2
To get started - launch Steam, locate the game in your library and follow the instructions to install the game.
As always, we rely on your feedback to improve the game, so please drop us a line and let us know how we're doing.
To install Steam, click this link:
http://www.steampowered.com/about Thanks, and enjoy your game!
The Dota 2 Team"
I'll check if there's a way to gift it.