I have heard stories about the origins of this hymn, but I am not really sure about them.
I believe it was written by William W. Phelps for the dedication of the Kirtland Temple. But I am not going to go research it right now.
Whatever, I think it is sung at all Temple dedications now. At least it has been at the 3 I have attended.
This is one of my top 5 favorite hymns.
I don't know the history of this hymn, but I love it. It's sends chills down my back, and I feel the truth and inspiration of the lyrics. The knowledge and power of God is filling the whole earth, and the Spirit of God is burning bright for those who seek it.
I believe you are right. The hymn was written and sung at the Kirtland dedication. It has been changed since the original wording. In the original ( or in any hymnal before 1900) there was an additional verse that talks about getting our washing and annointings. This verse was omitted but not sure why.
022: "The Spirit of God"
Episode 22: The history behind "The Spirit of God": This hymn goes back to the early foundations of the Church and is richly entwined with the history of the Restoration. William W. Phelps wrote "The Spirit of God." He was born in 1792, and just three days after the organization of the Church, he purchased a copy of the Book of Mormon from Parley P. Pratt. He was later baptized, ordained to the high priesthood by the Prophet, and put his exceptional gifts to use for the sake of the kingdom of God.
See and hear: Source 8