It might surprise many to know that, even though the Genesis account is some 3,500 years old, the events in universal history described in it basically correspond to what scientists believe must have taken place.
And not only did the writer of Genesis (Moses) list the creation steps in the proper order, but consider the evidence of the Bible inspiration with just the first three words of Genesis preceding these steps: "In the beginning".
This is the most basic concept to our understanding of the universe. In 1917, Albert Einstein had found that his newly developed theory of general relativity indicated that the universe must be either expanding or contracting. At first he was unable to believe what his own equations were telling him, and so Einstein introduced a cosmological constant (a "fudge factor") to the equations to avoid this "problem". The reason why Albert Einstein didn't want to accept the idea of an expanding universe is because this fact would point to a beginning for the universe, and a beginning would need a "first cause": a "beginner" for the beginning. Albert Einstein did not believe in God and this personal prejudice predated his study of science. When Einstein heard of the discovery of Edwin Hubble which supports the idea of an expanding universe, he said that changing his equations was "the biggest blunder of [his] life". He never did believe in God, but it remains the simplest explanation for why the universe had a beginning. The big question is "How did Moses know?" There is no other story, ancient account, or myth which says that the universe had a beginning. The idea in ancient times was extraordinarily unique.
"No myth has yet been found which explicitly refers to the creation of the universe, and those concerned with the organization of the universe and its cultural processes, the creation of man and the establishment of civilization are marked by polytheism and the struggles of deities for supremacy in marked contrast to the Heb. monotheism of Gn. 1-2."—New Bible Dictionary, edited by J. Douglas, 1985, p. 247.
The simplest explanation is that Moses knew because his words were inspired by God.
For more, see:
The Untold Story of Creation (JW.ORG)
Creation - Links to Information (Defend Jehovah's Witnesses)