In the beginning, God created the heavens and the earth.
Before the beginning of everything, God was there. We can easily forget that God exists independent of time and space as we know it. Questions like "How long did God exist before he made everything?" or "What did he do before making everything?" these are meaningless questions which, if they could be answered, wouldn't help our understanding.
The phrase "the heavens and the earth" could be re-stated as "everything inside of, and including, the entire universe". God made it all. Again, asking what exists outside of the universe or what existed before the universe is meaningless. All we know is that God was not created. His eternal existence means that he existed when and where there was no universe, and his continued existence doesn't depend on the existence of the universe (where our much more humble existence does!)