I cannot find any connection between this song and Mormonism. I read one attempt to link it to Freemasonry, but the account seemed stretched to me. As far as I can tell, it is simply a "Victorian ballad" style Christian song, which "combines phrases and thoughts from verses in The Psalms, The Gospel of Matthew and The Revelation of John". The first part describes Jerusalem at the time of Christ's triumphal entry, the second part describes Jerusalem when Christ was crucified, and finally the New Jerusalem that is yet to come is featured at the end. The Cross is given the central message. The lines, "The gates were open wide, / And all who might enter, / And no one was denied" might be construed as universalist, but more likely are due to the New Jerusalem being part of the New Earth, when all of the rebellious have been cast into the Lake of Fire. (Revelation 20:10-15, and chapters 21-22)