This sounds very familiar in sorts to my relationship with my, soon to be, ex-wife. Because of the preasure she put on me in the bedroom and her lack of caring for my pleasure, only her own, it was like she was re-abusing me and caused me to be unable to perform. Thus, due to our male hormones and egos, we shy away from activities that we are afraid of.
What my therapist has told me is that had she been a mutual partner in the bedroom much of this would have never happened. As far as him being gay as you have suggested, I rather doubt it, but one never really knows and that includes him probably. When we are unable to perform with a woman, it causes not only you to doubt him but for him to doubt himself. He very well may be truggling to find his sexual identity as all of us have who have survived male sexual abuse. Therapy in this area will for sure be a good idea and probably as you say mandatory before you go any further.
Depending on how comfortable the topic is with the two of you, you might want to sit down and discuss what pleases and turnes each other off in the bedroom and then try focusing on the turn on's and avoiding the turn off's. Another thing my therapist did and it was a little corny at the time, but it could have worked had she put forth any effort was colored cards. We each had a set and depending on the color each hung from the bed post each night determined what happened. For example: If we both hung white, we did nothing, Blue, we just cuddled, Green a little touching and Red all the way. Whoever hung the least was what set the pace, so you always knew what the other expected that night. Kinda corny, but it eliminated all guessing and for me, if I couldn't tell if she was in the mood or not and tried to do anything, I was always afraid I would be forcing to do something she didn't want, thus, in my mind, being the perpatrator. We never really used them as by this time she was already having an affair and could have cared less, but I still think it is a good exercise.
The key is still going to be open and very frank discussions and getting a qualified therapist. Don't expect miracles overnight the recovery will be long and slow at times, but hopefully well worth it.