Revelation 1:7: "Behold, he is coming with the clouds, and every eye will see him, even those who pierced him, and all tribes of the earth will wail on account of him. Even so. Amen."
John 20:24-31: "Now Thomas, one of the Twelve, called the Twin, was not with them when Jesus came. So the other disciples told him, 'We have seen the Lord.' But he said to them, 'Unless I see in his hands the mark of the nails, and place my finger into the mark of the nails, and place my hand into his side, I will never believe.'
"Eight days later, his disciples were inside again, and Thomas was with them. Although the doors were locked, Jesus came and stood among them and said, 'Peace be with you.' Then he said to Thomas, 'Put your finger here, and see my hands; and put out your hand, and place it in my side. Do not disbelieve, but believe.' Thomas answered him, 'My Lord and my God!' Jesus said to him, 'Have you believed because you have seen me? Blessed are those who have not seen and yet have believed.'
"Now Jesus did many other signs in the presence of the disciples, which are not written in this book; but these are written so that you may believe that Jesus is the Christ, the Son of God, and that by believing you may have life in his name."
Revelation 7:9-12: "After this I looked, and behold, a great multitude that no one could number, from every nation, from all tribes and peoples and languages, standing before the throne and before the Lamb, clothed in white robes, with palm branches in their hands, and crying out with a loud voice, 'Salvation belongs to our God who sits on the throne, and to the Lamb!' And all the angels were standing around the throne and around the elders and the four living creatures, and they fell on their faces before the throne and worshiped God, saying, 'Amen! Blessing and glory and wisdom and thanksgiving and honor and power and might be to our God forever and ever! Amen.'"
+++
The text is public domain:
Lo! He comes with clouds descending,
Once for ev'ry sinner slain;
Thousand thousand saints attending
Swell the triumphs of His train:
Alleluia, alleluia, alleluia!
Christ the Lord returns to reign.
Ev'ry eye shall now behold Him
Robed in glorious majesty;
Those who set at naught and sold Him,
Pierced and nailed Him to the tree,
Deeply wailing, deeply wailing, deeply waiting,
Shall their true Messiah see.
Those dear tokens of His passion
Still His dazzling body bears,
Cause of endless exultation
To His ransomed worshipers.
With what rapture, with what rapture, with what rapture
Gaze we on those glorious scars!
Yea, amen, let all adore Thee,
High on Thine eternal throne;
Savior, take the pow'r and glory,
Claim the kingdom as Thine own.
Alleluia, alleluia, alleluia!
Thou shalt reign, and Thou alone!
+++
The Revelation 1 text appears in the first two verses, specifically in the phrases "He comes with clouds descending," "ev'ry eye shall now behold Him," "those who... pierced and nailed Him to the tree," and "deeply wailing" (repeated as if to emphasize the intensity of the emotion).
The third verse deals with the John 20 text. The marks of Christ's crucifixion are mentioned, and Thomas' "My Lord and my God!" is described as "endless exultation."
The other Revelation text (from chapter 7) comprises the fourth verse, with all people adoring Christ the Lamb on His throne. Of the list of attributes, only power and glory are included in the hymn text.
The "great multitude that no one could number" from the Revelation 7 text also appears to be the source of the "thousand thousand saints" in the hymn's first verse.