It seems to me 1 John 1:8 has the effect of refuting Pelagianism.
I would note that not all cults referred to as “Gnostic” believe sin does not exist - rather, those heresies classified as “Gnostic” tend to adhere to a dualist view in which matter is evil (whereas Christian Science denies its existence), and in some heresies of this kind sin is possible, in the form of failure to reject the material world in one way or another, for example, in some of these cults, having children is considered a grave evil. In others, like Mandaeism, which is non-Christian, but widely regarded as the last surviving intact Gnostic religion from antiquity* sins must be cleansed away through ritual purification, specifically the Mandaeans venerate John the Baptist and engage in baptism at least once a week to wash away sins and prepare themselves for union with the “great life.”
The main distinction between these religions and orthodox Christianity is that the Gnostic heresies, whether Christian or attached to another religious “host” (since Gnosticism was a sort of pan-religious heresy that would affix itself primarily to monotheistic religions in a parasitic manner, particularly Manichaeism, which attached itself via Mani’s three wicked disciples who took the names Hermes, Buddha and Thomas in order to spread the religion to followers of the cult of Hermes Trimegistus in Egypt, the Buddhist religion in India and the Far East (it would also syncretize with Taoism), and one who took the name Thomas to the Christians known to Mani, the Persian false prophet who founded it (who himself seemed to be equally focused on converting Zoroastrians and Christians to his new religion through correspondence in which he claimed to be an “Apostle of Jesus Christ” and by composing several religious texts including an illuiminated manuscript, where his skill as a painter greatly helped him).
Naming his “apostle” Thomas was a cynical move: In Persia and the Orient, where Syriac Christianity was predominant, St. Thomas the Apostle was held in high esteem, being the subject of several false Gnostic texts, and having in fact established, with the help of the apostles Addai (possibly Thaddeaus) and Mari (of the Seventy) the churches in Edessa, the Nineveh Plains, Seleucia-Cstesiphon (sometimes called Babylon, the successor to Old Babylon the capital of Nebuchadnezzar, and the predecessor of modern-day Baghdad, due to shifts in the alignment of the Tigris), and the Malabar Coast of India, where he was martyred in Kerala in 53 AD (the church on the site of his martyrdom dates from the first century, albeit with a 16th century facade built by the Portuguese, and is the oldest continually operating Christian place of worship in the world, so far as we are aware).
At any rate, this aspect of Manicheaism, how it parasitically attached itself to existing religions, and when threatened would try to hide itself among members of that religion, reflects the common practice of dissimulation, which was common to most Gnostic sects: with some notable and famous exceptions, the early Gnostics did not value martyrdom in the way the orthodox Christians did, and would actively avoid it by concealing their faith (this became less common among some later Gnostic sects such as the Albigensians).
The dissimulation aspect makes particular sense given that the common soteriology that causes people to classify these various early sects as Gnostic is the idea that one is saved (by Jesus Christ or another messianic figure) from the world of evil matter and liberated as a spirit through secret knowledge, handed down, for instance, from secret teachings of one of the Apostles, such as Thomas, hence the proliferation of psuedepigraphical Gnostic “gospels.” This may well have started as early as the 1st century, although I believe the warning of St. Paul in Galatians 1:8-9 was not specifically written with any proto-Gnostic sect such as that of Simon Magus in mind, but rather was intended to encompass all heretical sects that taught a gospel that differed from the Good News preached by the Apostles.
* That is, aside from certain syncretic religions like Yazidisim and Yarsanism and Alevism that are practiced mainly by Kurds, and in the case of Alevism and Bektasism by some Turks and Albanians, that contain a mix of Christian, Syrian Gnostic, Zoroastrian, Islamic, Kurdish tradition and Oriental influences perhaps via Manichaeism.