It happens to all of us from time to time. I know that the times when I REALLY want to climax the most, can be the times when it just won't happen.
This happens to guys from time to time, especially when they're worried about being able to please their lovers. The brain IS the largest sex organ, and if a guy begins to worry instead of enjoying the experience, they know that losing the erection is a possibility, which can become a self fulfilling prophesy. And their best buddy fails them.
When it happens, just slow down, kiss him deeply and lovingly as you stroke him gently, then whisper to him, "There's no hurry. We have all the time in the world, just relax and let me do a few things for you, Baby."
If and when even that fails, [and if you live long enough, it will] kiss him and shrug philosophically and say, "Well, that just means we have 24 hours of all sorts of foreplay until tomorrow night!" And smile.