There’s a lot of misinformation above. I’m not a biblical scholar, but I’ve read a fair amount about it. Take the following as a starting point and do your own research.
Most reputable biblical scholars (both Christian and secular), date the 4 gospels at between 60-75 AD for Mathew, Mark and Luke (Mark generally being perceived as the earliest), and around 85-90 AD for John. Paul’s letters (epistles), many of which include/replicate key aspects of the history of Jesus, date earlier, from about 50-65 AD.
(one set of dates can be found here: http://www.theology.edu/faq01.htm)
While there is certainly scholarly debate on these datings, generally, the mainstream debate would push the dates of each gospel forward or backward by about a decade. That still puts all the canonical gospels well before the (likely) dates of things like this gospel of Judas.
Authorship:
Matthew - generally agreed to be the apostle Mathew
Mark - generally agreed to be a close associate of the apostle Peter
Luke - generally agreed to be a doctor who attended to and followed Paul (the latter was not an apostle, but obviously a major early church leader)
John - generally agreed to be the apostle John
It is possible that Matthew, in particular was not written by the apostle Matthew (the naming is by old tradition, not within the gospel itself). Some dispute the authorship of John as well.
The apocryphal gospels (like this Judas gospel), when they can be dated, generally date to much later - usually at least 100 years later.
They don’t just pull these dates out of nowhere. They’re arrived at in a number of ways, including internal references (what historical events in the early church and Jewish/Roman history are referenced/foreshadowed in the various books), external references (when do reliable external sources reference the books), early church history/tradition, and how widespread and widely accepted the books were (the theory being that a book that was spread widely around the Mediterranean at a comparitively early date was much more likely to be an older book than one that had a narrower/later reach).
The early church didn’t just select these 4 gospels, and the other books of the canonical New Testament, at random from amid a sea of possibilities. Rather, these books enjoyed wide acceptance throughout all of the scattered early churches. i.e. they weren’t accepted because they were canon, but rather, they became canon because they were accepted.
There was some dispute about whether to include a few of the New Testament books, but not the gospels. Rather, certain epistles (IIRC, Hebrews, James, Peter 2, John 2 & 3, Jude) and Revelations. But they were eventually fully accepted as well.