For as long as there have been bishops in the church, some of them have presumably been gay. What has been less common through the church’s history than appointing bishops who happen to be gay is being honest about doing so.
The first bishop in the Anglican Communion who was appointed in the full knowledge that he was in a same-sex partnership was the the Rt Rev Gene Robinson, the Bishop of New Hampshire in the USA. Bishop Gene visited St Mary’s to celebrate the eucharist and preach the gospel on 3 August 2008, during a Lambeth Conference. At the time, Bishop Gene was barred from attending the conference (supposedly the international gathering of all Anglican bishops). He was also barred from celebrating the Eucharist at every altar in the Church of England.
He was welcomed with much joy in St Mary’s.
Anxiety about the sexuality of candidates for the Episcopate remains a problem in very many parts of the church. There is now no bar to someone becoming a bishop in the Scottish Episcopal Church who is married to a same-sex partner. This was resolved in 2017, only when the church passed legislation enabling same-sex couples to marry in church.