Just out of interest are you/were you using porn? If you are or were, check this out:
http://yourbrainonporn.com/how-long-will-it-take
In particular the following bit:
A few rare fellows recover very quickly, within a few weeks. It's unlikely they had developed addiction-related brain changes. A few guys recover within 4 - 6 weeks. Most older guys, who did not grow up with the Internet, recover after 8-12 weeks of no porn, no masturbation and no orgasm. However, they will continue to see improvements after their erections return.
More than a few take 3-6 months, or longer to regain erectile health. Recent rebooting accounts indicate that young guys who started on high speed Internet porn at an early age can take 9 months or longer, and will continue to experience improvements for months after the return of healthy erections.
So what this is saying is if you're a younger guy who grew up masturbating to porn on the Internet then even though you've been porn free for like months it could still be causing you problems, just wanted to give you the heads up there.
The other thing is of course, the performance anxiety, already discussed in this thread. I reckon the best cure for performance anxiety is basically pull a whole lot of girls home until it's no big deal anymore. And then if you can't get it up just play around with her and figure you'll get someone new the next day -- if you don't really care and just let go, then the performance anxiety has no leverage over you and you will perform normally. Anyway, just try to collect positive reference experiences and the problem should resolve by itself.
Also, if you can't get it up make sure you act like it's no big deal, this might mean not going in as hard when you escalate, instead order her to play around with you, suck your nipples, caress you, etc, and eventually you should stop worrying about it and get in the mood. Think about when you escalate with a girl: She's all coy, not wanting sex etc... and then when you get to the pussy it's basically like flicking a switch, she turns into a tigress... so if you can get the girl to flip that switch for you, then you'll have no problems. Unfortunately, some girls are pretty inexperienced, so if you have one like this then I guess just be patient with her, keep giving her orders until she gets it right, and make sure you have plenty of time (3am in the Botanical Gardens when it's freezing cold and you're making out on your suit jacket laid out on some concrete steps isn't ideal -- see my LR- "Badly wanted to fill that tasty pussy" hehehe).
Hope that helps.
-Ray