The answer to this question will depend on what we mean by “gay.”
The Bible is very clear that all sexual activity outside of heterosexual marriage is morally wrong. This prohibition includes same-sex sexual activity. Jesus himself taught that any sexual activity outside of marriage was “evil” and “defiling” (Mark 7:20–23; the term we translate as “sexual immorality” is the Greek word porneia, an umbrella term for all sexual activity outside marriage).
Or consider the following teaching of Jesus on marriage:
And the Pharisees came up to him and tested him by asking, “Is it lawful to divorce one’s wife for any cause?” He answered, “Have you not read that he who created them from the beginning made them male and female, and said, ‘Therefore a man shall leave his father and his mother and hold fast to his wife, and the two shall become one flesh’? So they are no longer two but one flesh. What therefore God has joined together, let not man separate.” (Matthew 19:3–6)
Jesus indicates here that marriage is to be heterosexual (the introduction of marriage is an outcome of God having made humanity male and female) and is designed to be permanent—God has himself effected a union between the man and the woman that is not to be separated.
The disciples baulk somewhat at this high view of marriage, and it is significant to not how Jesus responds to their reaction:
“Not everyone can receive this saying, but only those to whom it is given. For there are eunuchs who have been so from birth, and there are eunuchs who have been made eunuchs by men, and there are eunuchs who have made themselves eunuchs for the sake of the kingdom of heaven.” (Matt. 19:11–12)
Eunuchs were the celibates of their day. And it is this particular way of life Jesus turns to the moment his followers question the viability of marriage. As far as he is concerned, the only godly alternative to (heterosexual) marriage is remaining single and sexually inactive. There is no place for cohabitation, promiscuity, or homosexual relationships.
From this we see that living a sexually active gay lifestyle is forbidden in the Bible. If by being a “gay Christian” we mean living out a gay lifestyle and identity, then it is clear that such a lifestyle is not compatible with following Jesus. Jesus himself said, “If you love me, you will obey my commands” (John 15); a Christian living in a way that consistently breaks Jesus’ commandments is not, ultimately, a Christian.
Yet this is not to say that it is not possible to be a Christian and experience homosexual feelings. We should expect a number of Christians to experience forms of same-sex attraction. We live in a fallen world. Creation has been subjected to frustration (Rom. 8:20), and so there is sickness and disorder. Christians succumb to the ravages of this fallen order as much as anyone. It is not unchristian to experience same-sex attraction any more than it is unchristian to get sick. What marks us out as Christian is not that we never experience such things, but how we respond to them when we do.
It is therefore entirely possible to be someone who experiences same-sex attraction and who lives consistently as a Christian. All Christians experience temptation, and all Christians experience sexual temptation. If by “gay” we mean someone whose dominant sexual attraction is to people of the same gender, then someone can be a “gay Christian.”
For more information, see Is God Anti-Gay? by Sam Allberry, and the website LivingOut.org for testimonies of Christians living with same-sex attraction.