The original tune was a German chorale melody named Meine Hoffnung (from its German text). This tune was also used as the principal choice for the Methodist Hymns and Psalms book of 1983.
In 1930, Dr Thomas Percival (TP) Fielden, director of music at Charterhouse School, sent Bridges' text to a friend, composer Herbert Howells, requesting Howells compose a new setting of the hymn for use at the school.
Howells received the request by post one morning, in the middle of breakfast. Almost immediately a tune suggested itself to him and the hymn was apparently composed on the spot (in the composer's words) "while I was chewing bacon and sausage."
The completed setting, titled A Hymn Tune for Charterhouse, was sent to Fielden, and became a regularly used hymn at the school.
Fielden was one of the editors of The Clarendon Hymn Book, and when that book was published in 1936 he chose to include the hymn. Howells' son Michael had died in childhood the previous year, and in tribute Howells rechristened the tune Michael.
The hymn's popularity increased in consequence as it became more widely known, though its use remained largely confined to public (independent) school use in Britain for the next thirty years or so.
Its popularity began to spread in 1969 when it was included in the "100 Hymns for Today" supplement of the Hymns Ancient and Modern, one of the standard Church of England hymnbooks of its day.
The Methodist church included it (albeit as second choice) in the 1983 Hymns and Psalms, and it was the main choice in the 1986 New English Hymnal. It has subsequently appeared in many hymnbooks across the English-speaking world.
Last verse harmonization by Noel Rawthorne..
The words are in the first comment.