Who wrote them
The early Church remembered who wrote each Gospel. Around AD 180, St Irenaeus, who had learned from Polycarp, a disciple of the apostle John, wrote it down.
Peter calls him "my son, Mark" (1 Peter 5:13). Paul calls Luke "the most dear physician" (Colossians 4:14), and near the end of his life writes, "Only Luke is with me. Take Mark, and bring him with thee" (2 Timothy 4:11).
John's Gospel ends by naming its source: "This is that disciple who giveth testimony of these things, and hath written these things: and we know that his testimony is true" (John 21:24).
Luke checked his sources
Luke opens his Gospel like a historian:
"Forasmuch as many have taken in hand to set forth in order a narration of the things that have been accomplished among us; According as they have delivered them unto us, who from the beginning were eyewitnesses and ministers of the word: It seemed good to me also, having diligently attained to all things from the beginning, to write to thee in order."
Luke 1:1 to 3
He says many accounts were already written, that they came from eyewitnesses, and that he checked everything from the start.
In Acts, Luke slips from "they" to "we" when he joins Paul on his travels: "immediately we sought to go into Macedonia" (Acts 16:10). He was there.
The clue at the end of Acts
Acts is the second volume of Luke's work. It opens, "The former treatise I made, O Theophilus, of all things, which Jesus began to do and to teach" (Acts 1:1). The former treatise is his Gospel.
And Acts ends abruptly:
"And he remained two whole years in his own hired lodging: and he received all that came in to him, Preaching the kingdom of God, and teaching the things which concern the Lord Jesus Christ, with all confidence, without prohibition."
Acts 28:30 to 31
Paul is alive, under house arrest in Rome, around AD 62. Then the book stops.
What Acts never mentions
Luke records the death of Stephen, the first martyr, and the death of the apostle James. If Paul had already been executed, or Jerusalem had already fallen, as Jesus foretold, it's very hard to see why he would leave it out.
The simplest answer is that Acts was finished around AD 62, while Paul was still waiting in Rome. Luke's Gospel came before that. And before Luke, "many" had already written.
Even earlier
Paul, writing to the Corinthians around AD 55, passes on what he had been taught when he became a Christian, a few years after the cross:
"For I delivered unto you first of all, which I also received: how that Christ died for our sins, according to the scriptures: And that he was buried, and that he rose again the third day, according to the scriptures: And that he was seen by Cephas; and after that by the eleven. Then he was seen by more than five hundred brethren at once: of whom many remain until this present."
1 Corinthians 15:3 to 6
Many of them still alive, Paul says. Go and ask them.
Why this is a big deal
The Gospels weren't legends written down centuries later. They were written by two apostles and two close companions of apostles, while eyewitnesses and enemies were both still alive to contradict them.
John said why he wrote: "these are written that you may believe, that Jesus is the Christ, the Son of God: and that believing, you may have life in his name" (John 20:31).