Sex is a psychological issue. What's going on in your mind will always have an affect on what's going on with your penis. This is generally a slow realization for guys. We tend to feel like we could all be in porns. Ready to go whenever. You forget movies can be edited.
Drinking makes erections more difficult. Being nervous really kills it. If you were thinking of the other girl, that probably added a little bit too.
Ever seen the episode of Friends where Rachel yells at Ross about his ED? "Its not that common, it doesn't happen to every guy, and it is a big deal!" Yeah, well, that's crap. Its very common, once in a while, but nobody talks about it.
Don't worry about it. You'll wind up with performance anxiety, which I have now with new partners after a particularly horrible, yet mercifully short, relationship.