I was asked the above question today. Below is my answer:

God has always existed. He has no beginning and no end. He is the first and the last. We have never experienced anything with no beginning and so can not comprehend it.

Before the beginning of the world ( which was the beginning of space-time) God existed in heaven. There are three heavens mentioned in the Bible. The 1st heaven in the atmosphere of the earth, the second heaven is what we call space. The 3rd heaven is not in this world and is where the throne of God is.