The Hymn "Lead Kindly Light" was one of those sung at the hymn service lead by Revd. Ernest Courtenay Carter.
Verses 1-3 were written in 1833 by John Henry Newman (1801-1890).
While traveling in Italy as a young priest, John Newman fell ill and stayed at Castle Giovanni almost three weeks. Finally, he was well enough continue his journey to Palermo:
'Before starting from my inn, I sat down on my bed and began to sob bitterly. My servant, who had acted as my nurse, asked what ailed me. I could only answer, "I have a work to do in England." I was aching to get home, yet for want of a vessel I was kept at Palermo for three weeks. I began to visit the churches, and they calmed my impatience, though I did not attend any services. At last I got off in an orange boat, bound for Marseilles. We were becalmed for whole week in the Straits of Bonifacio, and it was there that I wrote the lines, "Lead, Kindly Light," which have since become so well known.'
Verse 4 was added by Edward Henry Bickersteth, Jr. (1825-1906) who also wrote an extra verse to the hymn "Nearer, My God, to Thee", which may also have been played on the Titanic.
The usual tune to "Lead Kindly Light" is "Lux Benigna" (Kindly Light), written in 1865, by John Bacchus Dykes (1823-1876) but there is an alternative tune: "Sandon," by Charles Henry Purday (1799-1885 ) written in 1857. It is not known which setting was used on the Titanic.
Lead, kindly Light, amid th'encircling gloom, lead Thou me on!
I was not ever thus, nor prayed that Thou shouldst lead me on;
So long Thy power hath blessed me, sure it will, will lead me on.
Meantime, along the narrow rugged path, Thyself hast trod,
The Cyber Hymnal (http://www.cyberhymnal.org/)