Gray was a favourite of King
John of England, in return, Gray paid John 5,000
marks for the office. In 1209, Gray was one of the king's supporters who helped delay the promulgation in England of the
papal bull declaring John
excommunicated. Gray accompanied the king to
Dover in May 1213 when the king issued a royal
charter whereby John became a papal vassal, although Gray did not appear as a witness on the charter. A story was later told that he refused to affix his chancellor's seal to the charter, but this is a later invention. In late 1213 Gray went to
Flanders, relinquishing custody of the
great seal until his return in January 1214. John was so determined to secure Gray's election, that one of John's knights locked the
cathedral chapter into a room, supposedly telling them that they would not be released until Gray was selected. His election was set aside by
Pandulf Verraccio, the
papal legate. A second election to the see was also unsuccessful in 1213. after resigning as chancellor in October 1214. through the influence of John and
Innocent III. John had wanted Walter, but the
canons of York felt that Walter was ill-educated, and elected
Simon Langton, brother of
Stephen Langton,
Archbishop of Canterbury. John objected and wrote to Innocent III complaining of the election of the brother of one of his staunchest enemies, with which Innocent agreed. Innocent was said to have finally decided to give York to Gray because of Gray's virginity, which the pope was said to have declared a great virtue for Gray. However, Gray eventually paid more than 10,000
pounds to the pope in various fees to get his election confirmed. Gray was attending the
Fourth Lateran Council when he secured the papal assent to his translation to York and received his
pallium at the council. ==Royal service under Henry III==