The book opens in grief. John is challenged after the crucifixion by a Pharisee who tells him the Nazarene has deceived him, and the risen Christ appears in shifting form to answer the question that leaves him with.
The answer begins as far up as it is possible to begin. The first principle is the Monad, a single God of whom the text can only say what is not true, since it is beyond quality, quantity, naming and comprehension. From it proceeds Barbelo, its first thought, described in feminine terms and called the womb of everything, and from the union of the two comes a self-generated Christ and a sequence of aeons, the ordered divine world.
The collapse comes from within that world. Sophia, wisdom, conceives without the consent of her consort and without the approval of the Spirit, and produces something malformed. She hides it in a cloud away from the immortals, and it becomes Yaldabaoth, a lion-faced serpent who steals power from his mother, generates rulers of his own and fashions the material cosmos. He then says that he is a jealous god and that there is no other beside him, which the text treats as the definitive proof of his ignorance, since it shows he does not know the realm above him exists.
Salvation, in this system, is not a transaction over sin. Human beings carry a portion of the stolen light, placed in Adam by a stratagem that tricked the rulers into breathing it into him. What is required is recognition of what one already contains. The longer version closes with a monologue by Pronoia, forethought, describing three descents into the darkness to wake the sleeper and seal him in light.