In the Q Continuum books, it is revealed (non-canonically of course), that Q once asked the Guardian of Forever a question (A variation on "Is this all there is?" - IIRC), and Guardian opened gateways to several alternate universe. Several god-like beings like Q himself came through. One was the one that taught the children in TOS "And the Children Shall lead..."
One was god-head on the planet at the center of the galaxy (then still having a full, fiery body). And a final one, a very powerful leader.
Q went along with them, wreaking havoc. They like to "test" lesser species. One such test was to see if the then great empire (I can't remember the ffing name) could deal with their sun going nova. They could, they built a massive transporter construct around their sun, and another sun, and were set to beam the sun to exchange position.
The leader god-ling, didn't like it, according to him, none of the lesser species was worthy, they had to fail their test to prove it, so he sped up the star going nova, and boom.
Q tried to stop them but couldn't, afterward the continuum (deciding that Q learned his lesson about playing about with species and unknown omnipotent beings) helped out, and together they weakened the god-beings, blasted the body of "god", and trapped the remainder on the central planet, placing the barrier around the planet so he couldn't escape. The leader god, was tossed out of the galaxy and the barrier around the galaxy was placed to keep him out.
The "pumping up to god-like levels" of Mitchell, the woman (and a few people in the novels) was the god-leader reaching out to them, and corrupting them so they would help him break the barrier so he could go back inside the galaxy.
Good books!
