Squiggle, the book of Daniel was written around the time of the fall of Babylon ruled by Belshazzar when it was conquered by the Medes and Persians and absorbed into the Persian empire.
Chapter 7 http://www.kingjamesbibleonline.org/Daniel-Chapter-7/ is talking about the fall of empires and verse 27 is in keeping with the hymn verse you quoted:
"And the kingdom and dominion, and the greatness of the kingdom under the whole heaven, shall be given to the people of the saints of the most High, whose kingdom is an everlasting kingdom, and all dominions shall serve and obey him."
The chapter does have similarities with parts of Revelations.