I'd like to know if the Gospels were written only by Matthew, Mark, Luke and John. And if so, where did they gain their knowledge? I hear that Luke wrote his gospel some 40 years after Christ.
This is an issue for non-Christians and some Christians. The answer to your question has three parts. Here is the first.
The early church fathers are the best witnesses to tell us who wrote the gospels. Not until modern times have the authorship of these books been questioned. It is unreasonable to conclude that 2,000 years later we have better insight. Listen to Origen (A.D. 185-254) about the gospels and Matthew in particular,
Among the four gospels, which are the only indisputable ones in the Church of God under heaven, I have learned by tradition that the first was written by Matthew, who was once a publican, but afterwards an apostle of Jesus Christ . . .
Here is Papias (A.D. 60-130) on Mark,
Mark who wrote the Gospel . . . having become the interpreter of Peter, wrote down accurately whatsoever he remembered. It was not, however, in exact order that he related the sayings or deeds of Christ . . . one thing he took especial care, not to omit anything he had heard, and not to put anything fictitious into the statements.
The gospel of Luke is not only included in Origen’s quote above but his gospel is quoted (Luke 10:7) by the apostle Paul in 1 Timothy 5:18 as being scripture.
Maybe the best and most direct summary is given by Irenaeus (A.D. 130-200) ,
Matthew also issued a written Gospel among the Hebrews in their own dialect, while Peter and Paul were preaching at Rome, and laying the foundations of the Church. After their departure, Mark, the disciple and interpreter of Peter, did also hand down to us in writing what had been preached by Peter. Luke also, the companion of Paul, recorded in a book the Gospel preached by him. Afterwards, John, the disciple of the Lord, who also had leaned upon His breast, did himself publish a Gospel during his residence at Ephesus in Asia.
Some of Their Information
Luke tells us how he wrote his gospel. It is safe to assume the other writers did somewhat the same as we read above. So how did Luke obtain the material to write his gospel? Luke, the medical doctor, tells us how he wrote the gospel of Luke,
Inasmuch as many have undertaken to compile an account of the things accomplished among us, just as those who from the beginning were eyewitnesses and servants of the word have handed them down to us, it seemed fitting for me as well, having investigated everything carefully from the beginning, to write it out for you in consecutive order, most excellent Theophilus . . . Luke 1:1-3 (NASB)
Luke tells us that he collected information from eye witnesses and he carefully wrote what he heard in chronological order. Luke is the only writer who claims to have written in chronological order. The other gospels tend to be written in thematic order. That was common in those days. Chronology was less important.
Humans Have Limited Knowledge
Now let we ask the following question, “How did Matthew know the words of Jesus’ prayer?”
Then Jesus came with them to a place called Gethsemane, and said to His disciples, “Sit here while I go over there and pray.” And He took with Him Peter and the two sons of Zebedee, and began to be grieved and distressed. Then He said to them, “My soul is deeply grieved, to the point of death; remain here and keep watch with Me.” And He went a little beyond them, and fell on His face and prayed, saying, “My Father, if it is possible, let this cup pass from Me; yet not as I will, but as Thou wilt.” And He came to the disciples and found them sleeping, and said to Peter, “So, you men could not keep watch with Me for one hour? Matthew 26:36-40 (NASB)
According to this passage, Jesus left most of the disciples and only took Peter and the two sons of Zebedee with Him when He went to pray. Then just before He prayed, He left them (“went a little beyond them”) to pray. What is bad is they went to sleep. So even though their hearing was great, being asleep did not help them to know what Jesus said. Now Mark and Luke were nowhere near since they were not apostles. So your point is an excellent one. How did these writers, as well as Luke (Luke 22:40), know what happened?
God Wrote Too!
Even though Christians have been taught that the Bible was written by two authors – we tend to forget at times like this. We forget that the Bible was written by men and it was written by the Holy Spirit. Listen to the following passage,
But know this first of all, that no prophecy of Scripture is a matter of one’s own interpretation, for no prophecy was ever made by an act of human will, but men moved by the Holy Spirit spoke from God. 2 Peter 1:20-21 (NASB)
Not only did the human authors write with the knowledge of what they knew, they wrote under the influence of the Holy Spirit. The Holy Spirit made sure that what they wrote was accurate. Since I am 2,000 years away from the time of Christ, I want absolute confidence that the gospels as well as the other books of the Bible are accurate and truthful. Luke is only human and by himself would make mistakes. God says He does not lie (Numbers 23:19) and He says He wrote the Bible (2 Tim. 3:16-17). God claims He wrote the Bible by the Holy Spirit who used human authors.
Here is a great example,
. . .who by the Holy Spirit, through the mouth of our father David Thy servant, didst say, ‘WHY DID THE GENTILES RAGE, AND THE PEOPLES DEVISE FUTILE THINGS? Acts 4:25 (NASB)
This passage says the Holy Spirit wrote by the mouth of David. The Bible was written by two authors: the Holy Spirit and a human author.
So how did Matthew and Luke know what words Jesus prayed in the garden just before His death? The answer is revealed in the following passage of scripture,
And he said, “Go your way, Daniel, for these words are concealed and sealed up until the end time.” Daniel 12:9 (NASB)
Here the prophet Daniel is told to not reveal what he heard from the angel. The angel had answered some of his questions. He was allowed to reveal some of the information but there was some he could not reveal. So how did the apostles and the other writers of scripture know what to write? God had it revealed to them – revealed by angels. Himself, Christ and the Holy Spirit.
It does not really matter how long after Jesus’ death the gospels were written since the Holy Spirit is the one who really wrote scripture. What is important is that two apostles (Matthew and John) and two companions (Mark and Luke) of Paul, the apostle, wrote the gospels. The gospels of Mark and Matthew were written about A.D. 50-60 (17 to 27 years after Christ). The gospel of Luke was written about A.D. 60-61 (27 years after Jesus’ death) and John was written about A.D. 80-90. Remember, the Holy Spirit wrote the scriptures! The study series Solid Roots, can help you understand more about the origins of the Bible.
1. Origen, Ecclesiastical History, 6:25.
2. Papias, Exposition Of The Oracles of The Lord, 6.
3. Irenaeus, Irenaeus Against Heresies, 3.1.
Suggested Links:What books belong in the Bible? – Canon of Scripture
Why do we accept the Bible?
What does it mean that the Bible is inspired? – Inspiration of Scripture