Both Buddhism and gnosticism (gnosticism as a typological category) see our phenomenal world as a deception (maya) insofar as it is not what it appears to be. Worse still, at bottom, it only gives suffering to its subjects who cling to it. In the final analysis, nothing is signified by the phenomenal world except its nothingness as an illusion. Said another way, there is a radical discontinuity between phenomenal reality and spiritual reality in both Buddhism and gnosticism (even in the Gospel of John, which is not considered to be a gnostic text, we find the gnostic theme of light and darkness clearly established in the first chapter).
For the average person this seems unimportant. But then for Buddhism and gnosticism, the average person is spiritually asleep or dead who does not see the peril in clinging to the phenomenal world. For example, during our adult years, try as we might to secure a sure foundation for ourselves so that we might enjoy some measure of happiness, sooner or later misfortune strikes us. Our life must now face the sardonic grin of death but not finality since there is rebirth back into this oppressive system after death.
In light of this, gnosticism like Buddhism has a rather deprecatory view of the creator God and his creative handiwork which is vexing and certainly not what it is cracked up to be. As one might expect from this, at the heart of gnosticism is the revelation of a hidden escape route, a gnosis (in Sanskrit jñâna), which if perfected will liberate us from our bondage to this world, that is, an evil world that is the creation of a demiurgic God. This, in essence, is no different than the Buddha's insistence that we distinguish (prajñâ) between the psychophysical body (skandha) and our true self which is not psychophysical. Only then can we attain liberation or nirvana. This psychophyscial body, the Buddha goes on to explain in his discourses, belongs to none other than Mara, the Evil One who is Buddhism's devil.
Both Buddhism and gnosticism, it needs pointing out, draw a sharp distinction between “inner perception” of gnosis/jñâna/prajñâ and sensory perception by means of which we reinforce our connection with the false world of the demiurgic God “whose hand,” the Buddha says, “is so rarely spread to bless.” Such a sharp distinction finds itself even in the history of religion although it is not apparent at first sight. The history of Christianity reveals that there were the gnostic Christians and those Christians who refuted gnosticism. This is likewise found in Buddhism, perhaps in the difference between those who follow the small vehicle (hinayana) and those who follow the great vehicle (mahayana). The former deny that there is anything like a self or atman beyond the psychophysical body whereas the latter affirms the self as the Buddha-nature even calling those who deny the self, essentially, heretics who are to be shunned!