Many Pagan belief systems, such as my own, hold that gods are plural in number. This lends itself naturally to a fairly peculiar question: where do gods come from? Monotheistic religions, in general, have a much easier time with this existential quandary, as such belief systems generally consider their unique God to have spontaneously arisen and created the universe, as opposed to the view that the Universe existed before gods. Although I hold the opposing viewpoint, many others of Pagan beliefs may not. Therefore, I must insert the standard Pagan disclaimer: the belief system expressed within this write-up is mine and I can't speak for anybody else who calls xirself Pagan. In short, Paganism doesn't generalize.
My belief system does have an answer for questions about the origins of gods. I believe that it is the belief of souls that create gods. Note that the title of this node is something of a misnomer; there's nothing restricting this to humans, or, for that matter, Earth. But it is belief itself that creates the entity known as a god of some form.
Note that this statement is most emphatically not a claim that God is imaginary. This process of belief is a form of magic in itself that creates a god. A need is created in the area, and a god either arrives or is created to fill it. Belief and expression of belief is a transfer of energy from a soul to what is being believed in, and if that thing does not exist, sufficient quantities of that energy can build up to cause that thing to exist, or at least get the attention of something sufficiently similar. This may be how religious beliefs originally start- a sufficiently powerful god from a different locale (y'know, an extraterrestrial sort of place) wanders over to a new location, finds souls there, does its best to impress them, and accidentally or deliberately starts religion. Belief continues from there, and that may very well attract or create additional such entities.
The vaguely amusing corrolary to all this is that anybody who wishes to actually be a god only needs to find worshippers with sincere belief. This may be a nontrivial task and is left as an exercise for the reader. Note, however, that being a God is a lot more trouble than it's worth, according to my sources.