“A Poor Wayfaring Man of Grief” is one of the great LDS hymns. I learned to play it on the piano many years ago when I was alone one holiday season. It was originally written as a seven stanza poem titled, “The Stranger and His Friend” in 1826 by James Montgomery. Per the Church News (18 October 2008), the hymn was introduced to the Church by John Taylor who learned it as a missionary in England in 1840.
Well known as the favorite hymn of the Prophet Joseph Smith, John Taylor sang it to him twice the afternoon Joseph and Hyram were killed by a mob in a Carthage, Illinois jail.
When John Taylor became President of the Church, he commissioned Ebenezer Beesley to compose new music for the hymn as we now know it. In late 2008, the Church announced researchers had found the original, more upbeat tune sang to the Prophet Joseph by John Taylor.
We Mormon Wordled the hymn then post processed it a bit to get to the overall tones below. I think it does a nice job of catching the feel of the hymn.