About the time of Jesus, about 100 BC-100 AD, people living in the Eastern Mediterranean and West Asia were gradually beginning to think more about the afterlife than they had before. What happened to you after you died? Did you go to Heaven? How could you make sure you would go to Heaven and not to Hell? People were very worried.
Some people dealt with this by arguing that there was no such thing as life after death. Other people believed that baptism and faith in Jesus would get you into Heaven. The Gnostics tried to find secret knowledge (Gnostic comes from “gnosis”, the Greek word for knowledge). Some Gnostics were Christians and some weren’t, but they were all looking for some kind of knowledge that would help them get to Heaven.
For some people, this meant magic spells or charms. For other people, it meant reading special books, maybe secret books, like those in the picture. Some people looked for new philosophical paths to a better understanding of God. Some people – especially women – saw Gnosticism as a way to connect directly with God for themselves, instead of having to go through a (male) priest or a bishop.
Gradually, as people calmed down a little about this new idea of life after death, they lost interest in Gnosticism. The Christian bishops encouraged everyone to stop looking for shortcuts to Heaven and instead concentrate on prayer and being good, on doing what your priest and bishop told you to do, and on faith in Jesus. So by the 400s AD Gnosticism had pretty much faded away.