In 1 Timothy 6:20, Paul specifically exhorts Timothy
Avoid the irreverent babble and contradictions of what is falsely called “knowledge,”
In doing so, Paul is specifically calling on Timothy not to engage those who claim a special "Gnosis" that somehow elevates them. As such, Paul is not going to take on that heresy himself, but he does still provide the basis for rejecting it.
1 Timothy makes claims that stand in opposition to the docetic beliefs of the Gnostics.
1 Timothy 3:16 makes clear that
He was manifested in the flesh
and goes on to say in 1 Timothy 4
Now the Spirit expressly says that in later times some will depart from the faith by devoting themselves to deceitful spirits and teachings of demons, 2 through the insincerity of liars whose consciences are seared, 3 who forbid marriage and require abstinence from foods that God created to be received with thanksgiving by those who believe and know the truth. 4 For everything created by God is good, and nothing is to be rejected if it is received with thanksgiving, 5 for it is made holy by the word of God and prayer
Gnostics believee that matter itself was evil (and as such could not believe that God would deign to become matter), and as such made anything fleshy out to be bad. Eventually, since everything tangible was bad, they started suggesting that it didn't matter what the flesh did, only the spirit, and so they became libertines, orgiastic, and the like. Paul undercuts the argument he by rejecting the premise.
As Bruce Alderman points out, John may have been reacting to the Gnostic Gospel of Thomas (really just a collection of sayings mores than a narrative as we expect Gospels to be)
It has been debated whether or not Gnosticism predates Christiainity or if in turn Gnosticism grew out of Christianity. In any event, however, the fact that Paul was only mentioning it in his later books (argued by some scholars to actually be written by Pauls followers after his death) shows that much of the NT was already in place before it became a real threat to the church.
John, by contrast, is typically considered to be one of the last books, so a back handed reference fits in perfectly with that assertion.
Later, in 2 John (and here I'll claim same authorship) he writes
For many deceivers have gone out into the world, those who do not confess the coming of Jesus Christ in the flesh. Such a one is the deceiver and the antichrist.
Not a rebuttal, but at least you know where he stands.