Genesis 1: 1: In the beginning God created the heaven and the earth.
John 1: 1: In the beginning was the Word, and the Word was with God, and the Word was God.
The Bible tells us of two beginnings. The one we are most familiar with is that of the creation, when God made the universe. However, there was another beginning long before the universe came into existence, and this is what the Gospel of John opens with. Revelation 3: 14 explains this earlier beginning: And unto the angel of the church of the Laodiceans write; These things saith the Amen, the faithful and true witness, the beginning of the creation of God;
The beginning of the creation of God was the initiating expression of Elohim into visible form before the foundation of the world when the Logos came out of Him, seen as a Ball of Light, which was Jesus Christ the Son in His pre-incarnate form. The sum of all Deity was wrapped up inside that Ball of Light. This was God Himself beginning to express Himself in a creation of Himself. In this creation of Himself as the Logos (which is the Son of God, Jesus, having the appearance of Light), God then created the universe, bringing us to the beginning spoken of in Genesis 1: 1.