If he is trying to be with you he is not gay. Erectile dysfunction is
independent on the sexual preference.
If the problem persists (without the pills) he may need to do a medical
check-up and see a specialist (urologist) that would not be content
just to prescribe him a pill.
The best place to go would be at the cleveland clinic, ohio, at the
urology department. If they do not come up with something serious
he can try at boston university or university of san francisco.
Hopefully, he will get help at cleveland clinic.