Do you know your Steam account name?
To reset a lost password:
- Launch the Steam application on your computer.
- From the Steam Login dialog, click the "Retrieve a lost account..." button.
1) If you do not know your Steam Account name:
Select the I don't know my account name. option and click Next.
- Select an item of information, preferably the account's contact email address.
- Enter the contact email address on record with Steam to have Steam Support email your Steam Account name to this address.
- Repeat the initial step in this process and, upon receiving the email message containing your Account name, select the "I know my account name" option. Or, if you didn't receive this email message, Contact Steam Support.
2) If you know your Steam Account name:
- Select the I know my account name. option and click Next.
- Enter your account name in the Account name field and click Next.
- Check the contact email address for your Steam account for an email containing your Verification Code and Secret Question. If you didn't receive this email message, Contact Steam Support.
- Enter your verification code and the answer to your secret question in the Verification code and Secret answer fields respectively, then click Next.
- Steam will next require you to select a new password. Enter your new password twice to confirm the change, then click the Next button to reset your password.
I suspect that what has happened, is that the game you bought for your friend is still in your Steam Inventory - once you can get signed in to Steam, you can then go to you Inventory and gift it to your friend from there...but we'll see to that when we get to that stage
