Let's think about this.
1. How do we define gnosticism to distinguish it from orthodoxy?
The gnostic view saw Jehovah and the Old Testament as the bad demiurge and his book to be bad. They believed, I think, in one whom they considered to be an even higher deity. They also had a dualistic viewpoint that took a very negative view of the physical body and material world.
What else distinguishes them?
As Mr. Macson I think noted, both the gnostics and the orthodox respected what they considered to be the right "knowledge" and the wisdom (sophia) that comes from what they considered to be Jesus' gospel.
2. What did Jesus teach?
A large majority of the first century writings about Jesus and Christianity (eg. 1 and 2 Clement, the Didache, Mark's gospel) suggest that he taught that Jehovah was the true God and that the Old Testament was legitimate and to be respected, even if the New Testament somehow took higher authority or in some ways replaced it. I put a long list of them here:
viewtopic.php?f=3&t=2786&p=62053#p62053
Peter Kirby responded to me that perhaps the scholars generally don't classify the many gnostic works (like the Gospel of Mary) as first century works because the scholars themselves are biased against the view that the gnostic works were original and earlier in Christianity.
3. What did the leaders that Jesus appointed and who were close to Jesus teach?
A. James in his epistle seems to teach a conservative Judaic view of Christian practice. In Josephus and Hegesippus we read about his reverence for the Jewish Temple. In Acts and the Epistles we see him taking a more conservative Judaic view on practice than Paul. This conflicts with the gnostic approach to the Old Testament.
B. John in Revelation conflicts with Christian sects and writes to the mainstream churches. His associates included Polycarp and Papias, supposedly. He was in conflict with the gnostic leader Cerinthus, as in one story, he fled the bathouse when Cerinthus tried to befriend him there. In what is likely Cerinthus' apocryphon of James, Cerinthus takes a very hostile view of the Church leaders like Peter and John, iirc. John's Gospel also worships Jehovah, the God of the Old Testament and its prophets.
C. Peter's epistles also take a positive view of the OT God, and 2 Peter I think takes a negative view of docetism or gnosticism, although 2 Peter by some scholars isn't considered to be written genuinely by Peter.
D. Thomas and Mary Magdalene could be deep into mystical or hermetic views of Jesus, considering the hermetic style of the Gospel of Thomas, and the supernatural strange aspects of the Acts of Thomas (written maybe 200 AD), and considering Mary's visions of Jesus at the tomb and her 7 demons. Thomas' desire to touch Jesus in order to believe could reflect a docetist polemic or issue with Thomas. But unless one accepts the Gospel of Mary and the Coptic version of the Gospel of Thomas, it's hard to pinpoint them as definitely gnostic.
4. What was the status of the known, clearly identifiable, gnostic leaders within the early Christian movement? Were they ever close associates of Jesus or did they stay in touch with the apostles on good terms? Cerinthus seems to have been in conflict with the apostles. Simon Magus was baptised by the apostles but them came into harsh conflict with them according to Acts. Marcion came into the church from outside, from the pagan world, and his own invented gospel was rejected. One of the leaders of Simon Magus' followers after Simon's death was Menander, and Menander didn't become orthodox, but rather declared himself the Messiah which would be in conflict with him being Christian.