If we compare the initial description of the two witnesses in Revelation 11:3-4 with other scriptures we can build up a picture of them. Firstly what did Jesus say would happen to the early church when the Holy Spirit comes upon them – they will receive power and they will witness (Acts 1:8).
Acts 1:8 But you will receive power when the Holy Spirit comes on you; and you will be my witnesses in Jerusalem, and in all Judea and Samaria, and to the ends of the earth.” NIV
Acts 2:17-18 v.17 “‘In the last days, God says, I will pour out my Spirit on all people. Your sons and daughters will prophesy, your young men will see visions, your old men will dream dreams. v.18 Even on my servants, both men and women, I will pour out my Spirit in those days, and they will prophesy. NIV
“And WE are His witnesses to these things, and so is the HOLY SPIRIT whom God has given to those who obey Him.”Acts 5:32
Zec 4:2-6 v.2 He asked me, “What do you see?” I answered, “I see a solid gold lampstand with a bowl at the top and seven lights on it, with seven channels to the lights. v.3 Also there are two olive trees by it, one on the right of the bowl and the other on its left.” v.4 I asked the angel who talked with me, “What are these, my lord?” v.5 He answered, “Do you not know what these are?” “No, my lord,” I replied. v.6 So he said to me, “This is the word of the LORD to Zerubbabel: ‘Not by might nor by power, but by my Spirit,’ says the LORD Almighty. NIV
The two witnesses are two lampstands and we have already seen that the seven golden lampstands are the seven churches (Rev 1:20). Finally we have seen that the number two is the number of witness – the two witnesses are to be contrasted with the false prophet with two horns of Rev 13:11. The two witnesses are the true prophets of God – that it the church Church witnessing in the power of the Holy Spirit. Their power is the Holy Spirit, the Word of God and Prayer.
Revelation 1:20 The mystery of the seven stars that you saw in my right hand and of the seven golden lampstands is this: The seven stars are the angels of the seven churches, and the seven lampstands are the seven churches. NIV
The rest of the description of the two witnesses comes from various Old Testament prophets: Jeremiah, Elijah, Moses. Remember that they prophecy because they are prophets. We should remember that the NT records that Elijah’s power comes from prayer (James 5:17), he prayed and it did not rain cf. Rev 11:6.
Revelation 11:5-6 v.5 If anyone tries to harm them, fire comes from their mouths and devours their enemies. This is how anyone who wants to harm them must die. v.6 These men have power to shut up the sky so that it will not rain during the time they are prophesying; and they have power to turn the waters into blood and to strike the earth with every kind of plague as often as they want. NIV
The allusion to Jeremiah should be clear, their power is the word of God (fire comes from their mouths).
Jer 5:14 Therefore thus says the LORD, the God of hosts: “Because you have spoken this word, behold, I am making my words in your mouth a fire, and this people wood, and the fire shall consume them. ESV