BeliefNet excerpts a portion from a book by prominent New Testament scholar N.T. Wright talking about the historical trustworthiness of the four canonical Gospels. Wright explains why the Gospel of Thomas, pace Dan Brown's claims in the DaVinci Code, fails to be reliable history.
Against those who claim that the Gospels were written long after Jesus' death and are therefore unreliable, Wright points out that:
What is more, those four canonical gospels must all have been written by about AD 90 at the very latest. (I am inclined to think they are probably a lot earlier than that, but they cannot be later.) They are known and referred to by Christian writers in the first half of the second century.... And they incorporate, and are based on, sources both oral and written which go back a lot earlier, sources from the time when not only most of Jesus's followers were still alive and active within the early Christian movement, but when plenty of others--bystanders, opponents, officials--were still around, aware of the new movement as it was growing, and ready to challenge or contradict tales that were gaining currency.
There's more in the excerpt at the link.