Where did the "Gap Theory" come from?

Where did the idea of a "gap" between the first two verses of Genesis 1 originate?

Thomas Chalmers of Edinburgh University first proposed the Gap Theory in 1814. By inserting a chronological gap between the first two verses of the Bible, Chalmers felt that he could make room for the vast ages demanded by the geologists of his day, yet still maintain a literal interpretation of the Scripture. This view, now called the Gap Theory, asserts that the account beginning at Genesis 1:2 describes a re-creation, not the original creation. George Pember widely disseminated Chalmer's Gap Theory, with some embellishments, in his book "Earth's Earliest Ages" (first edition, 1876). Pember believed that Genesis 1:1 described an original creation, which included a race of pre-Adamic men and a world of prehistoric animals. He taught that God destroyed this primeval creation when Lucifer fell. A footnote in the Scofield Reference Bible (first edition, 1917) enormously popularized the Gap Theory in the English speaking world. It is only fair to add that many able and godly teachers among us men deserving of deepest respect - hold this view.

D. Vallance