On 20 June 1951, Gray was appointed Archbishop of St Andrews and Edinburgh by Pope Pius XII.
Pope Paul VI created the Scottish primate Cardinal Priest of S. Chiara a Vigna Clara in the consistory of 28 April 1969, and therefore the first resident cardinal in Scotland since David Beaton, over four centuries earlier.