The gap theory is an attempt to accommodate long ages into Christianity. This idea from the 19th century holds that between Genesis chapter 1 verse 1 and Genesis chapter 1 verse 2, some dramatic things occurred which are not mentioned in the Bible.
According to this idea, verse 1 declares that God created the universe. Verse 2 describes everything being formless and empty of structure. This view holds that the second verse describes the universe after God carried out judgment on the cosmos as a result of the actions of Satan who was originally an angel who rebelled against God. [But angels are not material, and the universe is material, so this alleged judgment on the universe does not make sense.]
Verse 3 is then considered to describe the beginning of God’s reconstruction of all things.
The rationale for this proposal is to allow for an ancient universe while at the same time subscribing to a 6 day creation week.
A problem with this proposal is that both the Old and New Testaments mention the flood of Noah a number of times, but there is nothing about a pre-Adamic catastrophe. This is clearly inserting into the Scripture text a lot of events that are not mentioned.
The Scriptures warn against adding to Scripture. See Deuteronomy 4:2 and 12:32, Proverbs 30:6 and Revelation 22:18.
For such reasons the gap theory has few advocates today.