At the beginning of time, Sophia (the world soul) broke away from Christ (the world spirit) and gave birth to Yaldabaoth, the arrogant creator-god of the Old Testament.
The exact process by which this cosmic fiasco occurred was the subject of much debate among the gnostics; in perhaps the oldest version of the story, Sophia's desire somehow veiled infinity, casting the shadow of matter from which Yaldabaoth emerged like a reflection or parody of the true, hidden god.
"A veil exists between the World Above and the realms that are below; and Shadow came into being beneath the veil; and that Shadow became Matter; and that Shadow was projected apart. And what she [Sophia] had created became a product in the Matter, like an aborted fetus.
And it assumed a plastic form molded out of shadow, and became an arrogant beast resembling a lion. It was androgynous... because it was from Matter that it derived."
Erupting from the nothingness of the void into material existence, Yaldabaoth proclaimed himself god; Sophia acted quickly to punish this cosmic usurper, blinding and banishing him in one fell swoop.
"Opening his eyes he saw a vast quantity of Matter without limit; and he became arrogant, saying, "It is I who am God, and there is none other apart from me!"
When he said this, he sinned against the Entirety. And a voice came forth from above the realm of absolute power saying, "You are mistaken, Samael."
And he said, "If any other thing exists before me, let it become visible to me!" And immediately Sophia stretched forth her finger and introduced Light into Matter; and she pursued it down to the region of Chaos. And she returned up to her light; once again Darkness returned to Matter."
THE DEMIURGE AND DISORDER
The birth of the the Demiurge can be taken as a metaphor for the emergence of entropy. According to the second law of thermodynamics, the overall disorder of any given system will always increase over time as the system seeks equilibrium - thus, meat rots, rocks roll downhill and machines wear out.
When the Big Bang introduced space, time and matter into existence, our infant universe - which was, at least for moment, a trillion times smaller and denser than the head of a pin - was also quite orderly. Nothing to do and nowhere to go - nothing existed but photons, or light particles.
This primitive state of order was only temporary, however; almost instantly, the universe exploded outwards, spawning billions and billions of suns, solar systems and even entire galaxies as it expanded and cooled.
Even as it inflated wildly, our universe had already begun dying, sliding towards inevitable (and unglamorous) heat death. One day, billions of years from now, there will be nowhere left to go, no more energy left to use up and nothing left to grow or create. The universe will stop spreading outwards, the stars will burn out, and life will quietly and gently extinguish itself.
The idea that our universe is nothing more than a giant spring winding down introduces a paradox. Why do we see evidence of increased order and increased complexity all around us, if the creation we know is ultimately based on the degradation of energy? Whence cathedrals, computers, the evolution of life itself?
The answer is that ecosystems, civilizations and even living beings are all examples of dissipative systems - complex networks of interlocking processes which take far more energy to build and maintain than they generate. These small pockets of order are anomalies, tiny islands of negentropy in a vast ocean of chaos; the more complex a given phenomenon, the more energy it must "eat" in order to maintain its identity and so, the more disorder it creates in the long run.