Conservative estimate: the first gospel, Mark (the gospel Matthew and Luke drew from), is the 70s, Matthew and Luke in the 80s, John in the 90s.

However, the book of Acts was written by Luke, the doctor, a companion of the apostle Paul. When Acts ends, Paul is under arrest in Rome, and you don't hear what happens to Paul. So, you can infer that Acts was written before Paul died, which was 62 AD. Acts was the "sequel" to Luke, so the book of Luke had to be written even prior to Acts. Since Luke was based on the book of Mark, you can date Mark to about the late 50s.

Anyway, Jesus was put to death around 30 AD. Even if you take the conservative dates of the authorship of the gospels, the books were still written within the lifetimes of eyewitnesses to Jesus. If legends had emerged, or the facts had been garbled up, you can be sure that especially those who opposed Christians would have declared them false.

Further, late dates of the accounts do not necessarily include inaccuracy. The earliest biographies of Alexander the Great were written more than 400 years after Alex's death in 323 BC, but historians consider them accurate.

Interestingly enough, Christian doctrines such as the resurrection can be shown to be written even earlier. Paul's epistles were written prior to the gospels, during Paul's ministry. In 1 Corinthians 15:3-5 (NIV):

For what I received I passed on to you as of first importance (1): that Christ died for our sins according to the Scriptures, that he was buried, that he was raised on the third day (2) according to the Scriptures and that he appeared to Peter and then to the Twelve.

I've noted two things of importance:

  • (1) The language Paul uses shows this was a creed passed to Paul, the verbs he uses are technical terms for sending and receiving by oral traditions.
  • (2) Dying for our sins, being buried and then resurrected are the heart of the gospel message.
So, it's clear that this creed of essential Christian beliefs was passed to Paul almost immediately after the event, and are reliable, not myths or legends which developed long after Christ's death.

See also: Are the gospels reliable?