Sex advice

I just started dating this new guy a few weeks ago and we have so much chemistry! The only issue is in the bedroom. He warned me that his first time with a new person is generally awkward and doesn't go well because he is self-conscious. I told him I didn't mind. The first time we got together it was really hot and heavy until it was time for him to put the condom on and go for it. Then he couldn't keep an erection. It was fine the first time but this has happened a total of 4 times now... I'm not sure what to do. He says he is attracted to me but it's making me question myself and him. Could he be gay? Has this happened to anyone else in the beginning of a new relationship?