The Gnostic gospels are writings by early "Christian" Gnostics. After the first century of Christianity, two primary divisions developed - the Orthodox and the Gnostics. The Orthodox Christians held to books we now have in the Bible and to what is today considered Orthodox theology. Gnostic Christians, if they can truly be described as Christians, held a distinctly different view of Biblical text, of Jesus the Christ, of salvation, and of virtually every other major Christian doctrine. However, they did not have any writings by the Apostles to give legitimacy to their beliefs.
This is why and how the Gnostic gospels were created. The Gnostics fraudulently attached the names of famous Christians to their writings, such as the gospel of Thomas, the gospel of Philip, the gospel of Mary, etc. The discovery of the Nag Hammadi library in southern Egypt in 1945 represented a major discovery of Gnostic gospels. These Gnostic gospels are often pointed to as the supposed "lost books of the Bible."
What are we to make of the Gnostic gospels? Should some or all of them be in the Bible? The argument is No, they should not. First, as pointed out above, the Gnostic gospels are considered forgeries because they are fraudulently written in the names of the Apostles in order to give them legitimacy in the early church. The early church fathers were nearly unanimous in recognizing the Gnostic gospels as promoting false teachings about virtually every key Christian doctrine. There are countless contradictions between the Gnostic gospels and the true Gospels of Matthew, Mark, Luke, and John. The Gnostic gospels can be a good source for the study of early Christian heresies, but they should be rejected outright as not belonging in the Bible and not representing the genuine Christian faith.