I guess that's the big dilemma that religion tries to solve: Where did all this come from?
As humans, we only have a fairly limited knowledge of the universe, its history, and how everything began.
We have theories and theology that attempts to provide reassurance and answers, but this is a good example of an unanswerable question.
According to religion, God simply "always was". And not in the sense that he was born and has been living for ever, his existence is meant to transcend things like physical form, birth, visibility.
Even scientifically, that makes perfect sense. There are plenty of things that exist but we can't see. UV rays from the sun for example.
Perhaps God (or the belief in God) is some sort of biochemical energy that has quantifiable effects on the physical world around us?
According to science though, he never was. He's just an explanation used to absorb all the questions we have yet to answer about the world around us: Where do people go when they're dead? How did we end up on Earth? Why does flooding happen?
Science hasn't got all the answers either though. For example, we're told that we live in an infinite and ever-expanding universe. But by definition, if it's expanding, it must be growing into something larger, no?
And what lies beyond the boundaries of the universe?
It seems like only a few years ago, we were ruling the likelihood of finding other lifeforms as pretty remote.
Now, reports say that up to 20% of stars in our universe could have planets with a similar size and temperature to Earth's. (source: http://www.huffingtonpost.com/2013/11/04/earth-like-habitable-planets-kepler-space-video_n_4214758.html)
Anyway, my answer is that if you believe in God, then the question isn't how he came to be - it is "how do you wrap your head around the idea that he has always been here - wherever "here" may be?"