From the Wikipedia article on John Gray:
His most important supporter, and life partner, was Marc-André Raffalovich, a wealthy poet and early defender of homosexuality. Raffalovich himself became a Catholic in 1896 and joined the tertiary order of Dominicans. When Gray went to Edinburgh he settled nearby. He helped finance St Peter's Church in Morningside where Gray would serve as priest for the rest of his life. The two maintained a chaste relationship until Raffalovich's sudden death in 1934. A devastated Gray died exactly four months later at St. Raphael's nursing home in Edinburgh after a short illness.
This is just another of Edinburgh's many literary connections.
Gray's poem "Summer Past" was dedicated to Oscar Wilde:
TO OSCAR WILDE
There was the summer. There
Warm hours of leaf-lipped song,
And dripping amber sweat.
O sweet to see
The great trees condescend to cast a pearl
Down to the myrtles; and the proud leaves curl
Fruit of a quest, despair.
Smart of a sullen wrong.
Where may they hide them yet?
One hour, yet one,
To find the mossgod lurking in his nest,
To see the naiads' floating hair, caressed
By fragrant sun.
Beams. Softly lulled the eves
The song-tired birds to sleep,
That other things might tell
The beetle humming neath the fallen leaves.
Deep in what hollow do the stern gods keep
Their bitter silence? By what listening well
Where holy trees,
Song-set, unfurl eternally the sheen
Of restless green?