|Page 33 of Codex Tchacos, the first page of the Gospel of Judas.|
It was written before 180 CE, when Irenaeus, a bishop of Lyons, wrote a document railing against it. The only known existing copy - a Coptic version which seems to have been translated from Greek and which was discovered in 1970 near Ben Masah, Egypt - has been carbon dated to between 220 and 340 CE.
It is an account contained within the so-called Codex Tchacos, in which Judas relates how Jesus taught him the secrets of Gnosticism because he alone was capable of understanding them, hence his separation from the other disciples. Judas also relates how he was carrying out Jesus' instructions when he identified him to the Roman soldiers, so ensuring the planned crucifixion went ahead. This would explain the curious paradox of it being Judas who ensured that the 'divine' plan for Jesus' crucifixion happened, whilst Simon Peter tried to stop it, yet Judas is despised and reviled as the archetypal traitor and Simon Peter is the 'rock' upon which the Catholic Church is built.
One thing which is interesting about this document, the so-called Euangelion Ioudas (Gospel of Judas), is that it is one of the earliest recorded extra-biblical mentions of Jesus, and yet it's never cited as evidence for the historicity of the biblical Jesus, at least not the traditional citations.