Revelation 12:7-12: "7 Now war arose in heaven, Michael and his angels fighting against the dragon. And the dragon and his angels fought back, 8 but he was defeated, and there was no longer any place for them in heaven. 9 And the great dragon was thrown down, that ancient serpent, who is called the devil and Satan, the deceiver of the whole world - he was thrown down to the earth, and his angels were thrown down with him. 10 And I heard a loud voice in heaven, saying, 'Now the salvation and the power and the kingdom of our God and the authority of his Christ have come, for the accuser of our brothers has been thrown down, who accuses them day and night before our God. 11 And they have conquered him by the blood of the Lamb and by the word of their testimony, for they loved not their lives even unto death. 12 Therefore, rejoice, O heavens and you who dwell in them! But woe to you, O earth and sea, for the devil has come down to you in great wrath, because he knows that his time is short!'"
John 12:31-32: "31 'Now is the judgement of this world; now will the ruler of this world be cast out. 32 And I, when I am lifted up from the earth, will draw all people to myself.'"
1 Peter 5:8-9: "8 Be sober-minded; be watchful. Your adversary the devil prowls around like a roaring lion, seeking someone to devour. 9 Resist him, firm in your faith, knowing that the same kinds of suffering are being experienced by your brotherhood throughout the world."
1 Corinthians 15:54-57: "54 When the perishable puts on the imperishable, and the mortal puts on immortality, then shall come to pass the saying that is written: 'Death is swallowed up in victory.' 55 'O death, where is your victory? O death, where is your sting?' 56 The sting of death is sin, and the power of sin is the law. 57 But thanks be to God, who gives us the victory through our Lord Jesus Christ."
+++
The text from Revelation is the main referent. Most of the first two verses and some of the last two verses are drawn from it and from the text from John 12. The end of the second verse ("Now he prowls, unsatisfied") is taken from 1 Peter 5:8.
The third verse comes from Genesis 3, and the last line ("'You'll lie crushed beneath His feet!'") comes specifically from verse 15: "'I will put enmity between you and the woman, and between your offspring and her offspring; he shall bruise your head, and you shall bruise his heel.'"
The text from 1 Corinthians 15 appears in the fourth verse, but the hymn draws mostly from verse 57. "Yet to life [Jesus] was raised victorious; / By His life our life supplied."
The beginning of the first verse ("Swift as lightning falls the tyrant / From his heav'nly perch on high") comes from Luke 10:18: "And he [Jesus] said to them [the seventy-two He had sent out], 'I saw Satan fall like lightning from heaven.'" The wound mentioned at the end of the verse ("Wounded by a wound eternal / Now his judgement has drawn nigh!") seems to refer to the "mortal wound" described in Revelation 13:3.