The precise formulation that the Society gives draws on 19th-century biblical interpretation (see below), but it ultimately is rooted in a stream of exegesis that goes ultimately back to the first century AD. But it should be recognized that these concepts are exegetical; they aren't contained in the Bible itself, and the relevant source texts (such as the Eden narrative in Genesis) presume altogether different underlying concepts. The notion that a creative day = 7,000 years draws on several converging exegetical traditions. I will lay some of them out below.
As is generally recognized in biblical scholarship, the first chapters of Genesis combine two originally independent creation narratives: the older account of J (primarily ch. 2-3) and the priestly account of P (primarily ch. 1). There are contradictions and differences between these accounts and Jewish midrash sought to develop harmonizations between them. The Lilith legend, for instance, arose in order to explain why man and woman were created together on the sixth day (ch. 1) but then Eve was created sometime later (ch. 2). The early interpretations of ch. 1 took the days to be literal days and that is doubtless what P originally intended (so the days contain alternating periods of light and darkness corresponding to morning and evening, cf. Exodus 20:8-11). So the Essene calendar, for instance, started the year (I/1) on a Wednesday because that was the day when the sun was created (cf. Jubilees 2:13).
The first exegetical move that contributed to the Watchtower concept was one that concerned not the creative days of ch. 1 but the "day" referred to in Genesis 2:17. The exegetical problem is that God seemingly warned that Adam would die the very "day" he ate from the fruit (2:17), but in fact 5:5 states that Adam lived to the ripe old age of 930. In fact, there really isn't a contradiction here. There is a subtlety in the grammar in 2:17 in which the phrase b-ywm + infinitive construct could either be taken literally to mean "in [the] day" or simply as a temporal expression meaning "when" or "once". That the latter is what the author probably intended can be seen in a second instance of this expression in 2:4. There is a close parallel in 1 Kings 2:37, concerning a Benjaminite named Shimei: "It shall be that once you leave (b-ywm ts'tk, lit. "in [the] day that you leave") and pass over the river Kidron, you shall certainly know that you shall certainly die". This latter text is quite interesting because it is strikingly similar to Genesis 2:17 in its phrasing (i.e. b-ywm + infinitive construct with solemn intensified "you shall certainly die" as a consequent). In this story of Shimei, he did not realize that he was going to die on that day he crossed the Kidron, or at the same time he crossed it, but sometime later, after he had returned from his trip (v. 40-46). That he even returned shows that he did not expect to die. Yet his death was inevitable once he crossed the Kidron. It is pretty much the same thing in Genesis 2-3. "Once you eat it you shall (thenceforth) truly die" is one way of understanding the prohibition. By banishing the man and woman from Eden and limiting access to the tree of life, death was thenceforth inevitable. It doesn't mean that the death would actually occur that same day.
However the rabbis took the expression literally, and wanted to find a day of harmonizing 2:17 with 5:5. And so they found the exegetical key in Psalm 90:4: "A thousand years in your sight are like a day that has just gone by, or like a watch in the night". This text is metaphorical but the interpreters took it literally: when God warned that Adam would die that DAY, God meant he would die within a period of 1,000 years. And indeed Adam died at the age of 930, which fits snugly within a single 1,000-year "day". This interpretation has been around at least since the second century BC, and finds expression in such tests as Jubilees 4:30, Justin Martyr, Dialogue 81, Irenaeus, Adversus Haereses 5.23.2, Midrash Psalms 25:8, Genesis Rabba 19:8, 22:1, Numbers Rabba 5:4, and Pirqe R. Eleazar 18. So that was the first exegetical move that contributed to the notion that the Watchtower Society later developed.
The second idea, which has an entirely independent origin, is that the "day" or "days" of the Messiah or God's eschatological agent would equal a thousand or several thousands of years. This concept is otherwise known as millennialism or chiliasm, may ultimately have an origin in Zoroastrianism which parallels many other Jewish apocalyptic ideas (such as Judgment Day, an eschatological Savior figure, the resurrection, and eternal punishment by fire). The earliest exemplar of this notion may well be found in the largely parallel Animal Apocalypse and the Apocalypse of Weeks (both dating to the early second century BC), the latter dividing human history into a series of ten great weeks (each likely consisting of ten jubilees, or 490 years). The present time (the end of the seventh week) is to be followed by an eighth week of righteousness in which the chosen people with a sword fight against wickedness and exterminate evil from the land. At the conclusion of the eighth week, peace and righteousness is secured and a new Temple is built in the land. Then in the ninth week this righteousness is spread throughout the entire world and continues through the tenth week (1 Enoch 91:11-14). At the end of the tenth week, the wicked angels are judged and punished and the heavens and earth pass away and a new heaven and earth appear, with endless weeks of peace to last for all eternity (91:15-17). The era of peace extending from the messianic conquering of evil until the final judgment of the angels thus lasts two great weeks, or almost 1,000 years. This idea was then adopted by the author of Revelation, who construed a millennium intervening between the defeat of evil on earth and the final judgment and punishment of Satan and his angels (20:1-15). The author of 2 Peter appears to have drawn on a scenario very similar to that found in the Apocalypse of Weeks and Revelation. The author is concerned with the apparent "delay" in the arrival of the "Day of the Lord", and he cites Psalm 90:4 in order to argue that " The Lord is not slow in keeping his promise, as some understand slowness. Instead he is patient with you, not wanting anyone to perish, but everyone to come to repentance" (3:8-9). Then the destruction of the heavens and earth would follow, and the creation of a new heaven and earth (3:7, 10-13). The implicit scenario seems to be the same as that of the Apocalypse of Weeks and Revelation: there would be a thousand years for the proclamation of the gospel, with the conversion of the whole world into righteousness (= the ninth and tenth weeks), to be followed by final judgment and the institution of a new heavens and earth. The exegetical basis for this notion of a millennium was also found in Psalm 90:15, wherein the psalmist wishes for God to make his people glad "for as many days as you have afflicted us," and since v. 4 mentions a thousand years, the interpreters concluded that there would be a thousand years or many thousand years of peace to follow. The idea of the "day" or days of the Messiah lasting a thousand or thousands of years was later expressed by Justin Martyr, Dialogue 81, b. Sanhedrin 99a, Midrash Psalms 90:17, and Pesiqta Rabbati 1:7. Justin Martyr (middle of the second century AD) connected these two concepts together:
"For as Adam was told that in the day he ate of the tree he would die, we know that he did not complete a thousand years. We have perceived, moreover, that the expression, 'The day of the Lord is as a thousand years,' is connected with this subject. And further, there was a certain man with us, whose name was John, one of the apostles of Christ, who prophesied, by a revelation that was made to him, that those who believed in our Christ would dwell a thousand years in Jerusalem; and that thereafter the general, and, in short, the eternal resurrection and judgment of all men would likewise take place" (Dialogue 81).
The linkage between the messianic millennium and the 1,000-year "day" during which Adam lived precipitated the idea that Adam's "day" was the first in a series of "days" that recapitulate the seven days of creation, with each of the original normal days of divine creation (consisting of mornings and evenings) corresponding to 1,000 years of human history (drawing on Psalm 90:4). This analogy would mean that human history would last for 6,000 years and would be followed by a millennium sabbath rest, which corresponds to the millennium of the Messiah. This idea is expressed, for instance, in Pirqe R. Eleazar, 18: "God has created seven ages .... There are six for the coming and going of men but the seventh is completely sabbath and rest in everlasting life". An older but related concept is that human history between the creation of the world and Judgment Day would last 5,000 years; this is implied in the Assumption of Moses (early first century AD), a book alluded to in Jude 9, which dates Moses' death to the midpoint in the history of the world: 2,500 years after Creation (there is also no notion of a millennium in the Assumption of Moses). The even older Apocalyse of Weeks, which as argued above possibly did have a period akin to the Christian notion of the messianic millennium, construes a total of eight weeks of human history spanning between creation and the millennium that follows, i.e. a little less than 4,000 years. So apocalyptic speculation extended what was first thought to be a duration of 4,000 years into 5,000 years, and finally — on analogy of the days of creation — into 6,000 years. The earliest explicit formulation of this can be found in Barnabas (early second century AD), which explicitly quotes from the Apocalypse of Weeks (Barnabas 16:6, freely quoting 1 Enoch 93:12-13) and the Animal Apocalypse (Barnabas 16:5, freely quoting 1 Enoch 89:56-66) as inspired scripture. In discussing the true meaning of the sabbath, the author cites Psalm 90:4 in order to argue that a millennium sabbath rest would follow six thousand years of human existence:
"He speaks of the Sabbath at the beginning of creation: 'And God made the works of his hands in six days, and finished on the seventh day, and rested on it, and sanctified it' [cf. Genesis 2:2-3]. Observe, children, what 'he finished in six days' means. It means this: That in six thousand years the Lord will bring everything to an end, for with him a day signifies a thousand years. And he himself bears me witness when he says, 'Behold, a day of the Lord will be as a thousand years'. Therefore, children, in six days -- that is, in six thousand years -- everything will be brought to an end. 'And he rested on the seventh day.' This means: When his Son comes, he will destroy the time of the lawless one and will judge the ungodly... On the Sabbath, after I have set everything at rest, I will create the beginning of an eighth day, which is the beginning of another world. This is why we spend the eighth day [i.e. Sunday] in celebration, the day on which Jesus both arose from the head, and then ascended to heaven after appearing again" (Barnabas 15:3-9).
Similar ideas are found in Irenaeus, Adversus Haereses 5.28.3 and in the Talmud (b. Sanhedrin 97a). What is interesting about Barnabas is that he also allegorically links the "week" of human existence to the Passion Week (other church fathers, such as Theophilus of Antioch, also mentioned that Jesus was crucified on a Friday which corresponds to the "sixth", or final, 1,000-year day before the millennium). The creative-day interpretation of the span of human history continued throughout the Middle Ages, and contributed to Adventist thought where it formed the basis of Nelson Barbour's and Charles Russell's belief that 1874 marked the end of 6,000 years of human history and the dawning of the sabbatical millennium (1874 remained an important date for the Watchtower Society at least into the early 1930s).
———————————————————
What was not yet conceived was the idea that the creative days themselves were durations lasting thousands of years, and this was the last stage in this development of ideas that led to the Society's teaching. In all ancient sources I can think of, the days of creation were taken to be literal days (with some caveats, such as Basil of Caesarea who took the days to be 24 hours in length but claimed the first included within it the eternity that preceded it). It is a modern concern to interpret the days as lengthy periods or epochs in order to harmonize the Bible's account of creation with contemporary geological science (concordism); this was first suggested at the end of the 18th century and in the early 19th century. The notion that each creative day lasted 7,000 years depended on a new understanding of the seventh day: it was an age as well, corresponding to human history from the creation of Adam onward. Geologist Hugh Miller wrote about this idea in 1847: "I know not where we shall find grounds for the belief that that Sabbath, during which God rested, was commensurate in its duration with one of the sabbaths of short-lived man .... God's sabbath of rest may still exist; the work of the Redemption may be the work of His Sabbath day" (Footprints of the Creator, 1847, p. 307). So the six 1,000-year "days" + the millennium would constitute the seventh "creative day", and that meant that each of the other six creative days were 7,000 years as well. This idea had appeared in the middle of the 19th century and I believe that it was developed primarily by Rev. Bourchier Wrey Savile, who appears to have been the first to have published (at least extensively) on it. In 1866, he wrote:
"According to opinions very general amongst the ancient heathen, as well as amongst both Jews and Christians, the length of this age is supposed to endure 6000 years, with an additional thousand represented by the millennial period. Assuming such to be the doctrine of Scripture, we have fair grounds for concluding that God's resting time means a period of 7000 years; and if that be the limit of one of the seven days of the Mosaic cosmogony, all the others are probably the same duration" ("On the Credibility of the Pentateuch," The Christian Observer, No. 319, July 1864, pp. 528-529).
Then in 1877 he provided a more detailed explication, after quoting Miller:
"Have we, then, any intimation afforded in Scripture of the duration of God's day of rest? I think we have. The best chronologists amongst Jews and Gentiles, who take their stand upon the infallible Word of God, are agreed in this, that the age of man on earth, since the time of Adam, is limitd to a period, speaking in round numbers, of six thousand years. But, iasmuch as Scripture speaks also of a future millennial period of blessedness, lasting for one thousand years, which is termed in Hebrews (iv. 9) 'a rest or keeping of a sabbath by God's people,' we find that Christ's kingly rule over His 'possessions in the uttermost parts of the earth' (Psalm ii.8) is then said to end....Therefore we are warranted in assuming that God will resume His creative power at the termination of the period known as the millennium [when according to Revelation there will be a creation of new heavens and a new earth], when His rest-day will of necessity come to end, which would appear on Biblical authority to have extended through seven thousand years; and if this be a correct estimate respecting the duration of one Y OM or day, on the principle of analogy we may understand the remaining six Y OM s to be of the same duration....Supposing, then, seven thousand years to be the duration of each of these Y OM s, including that wherein God is now said to be resting, this would give, after deducing two of these Y OM s, or 14,000 years before the earth appeared in its present condition, from the forty-nine thousand years, the sum total of the whole, a period of thirty-five thousand years as the duration of the period [in which life appeared], reckoning from the third Y OM until the present time" (Rev. Bourchier Wrey Savile, "Heathen Cosmogonies Compared with the Hebrew," Journal of the Transactions of the Victoria Institute, Vol. 10, pp. 295-297)
The idea was thus widely circulated by the time Charles Russell began his religious activities, and he adopted the idea and it persisted among the Jehovah's Witnesses for most of the twentieth century until it was quietly dropped after the failure of the 1975 prophecy.