The two witnesses refer to the Old and New Testaments—the Bible.
“Concerning the two witnesses the prophet declares further: ‘These are the two olive trees, and the two candlesticks standing before the God of the earth.’ ‘Thy word,’ said the psalmist, ‘is a lamp unto my feet, and a light unto my path’ (Revelation 11:4; Psalm 119:105). The two witnesses represent the Scriptures of the Old and the New Testament. Both are important testimonies to the origin and perpetuity of the law of God. Both are witnesses also to the plan of salvation. The types, sacrifices, and prophecies of the Old Testament point forward to a Saviour to come. The Gospels and Epistles of the New Testament tell of a Saviour Who has come in the exact manner foretold by type and prophecy.
“ ‘They shall prophesy a thousand two hundred and three-score days, clothed in sackcloth’ (Revelation 11:3). During the greater part of this period, God’s witnesses remained in a state of obscurity. The papal power sought to hide from the people the word of truth, and set before them false witnesses to contradict its testimony. When the Bible was proscribed by religious and secular authority; when its testimony was perverted, and every effort made that men and demons could invent to turn the minds of the people from it; when those who dared proclaim its sacred truths were hunted, betrayed, tortured, buried in dungeon cells, martyred for their faith, or compelled to flee to mountain fastnesses, and to dens and caves of the earth—then the faithful witnesses prophesied in sackcloth. Yet they continued their testimony throughout the entire period of 1260 years. In the darkest times there were faithful men who loved God’s word and were jealous for His honor. To these loyal servants were given wisdom, power, and authority to declare His truth during the whole of this time.” The Great Controversy, 267, 268.
“According to the words of the prophet, then, a little before the year 1798 some power of Satanic origin and character would rise to make war upon the Bible. And in the land where the testimony of God’s two witnesses should thus be silenced, there would be manifest the atheism of the Pharaoh, and the licentiousness of Sodom.” Ibid., 269.