Robert Lowry did not set out to be remembered as a hymn writer. He trained for the Baptist ministry at the University at Lewisburg, was ordained in 1854, and spent the following decades pastoring Baptist congregations across Pennsylvania and New York, first at West Chester, then Bloomingdale in New York, then Hanson Place Baptist Church in Brooklyn, where he was serving in July 1864 when Shall We Gather at the River came out of him in a single afternoon. By his own account he was lying on a lounge, exhausted by the summer heat, turning over a complaint about the hymn writing of his own era, that it dwelt constantly on the river of death and almost never on the different river scripture actually describes flowing from God's throne, clear as crystal, in the Book of Revelation. He wrote both the words and the music that afternoon, unusual for a hymn writer of his period, and first published it the following year as Beautiful River, named for the church where it was written, in the collection Happy Voices.
Lowry kept preaching as his primary vocation for the rest of his career, later serving as chancellor of his old college, but his hymn writing steadily overtook it in public memory. From 1868 he spent nearly three decades as hymnal editor for the publisher Biglow and Main, overseeing more than twenty collections, one of them, Pure Gold, selling over a million copies on its own.