The canonical gospels are the ones which the Church has recognised as divinely inspired and which faithfully hand on the apostolic tradition. There are four, and only four: Matthew, Mark, Luke and John.
At the end of the second century we find this stated explicitly by St Irenaeus of Lyon (“Against the Heresies”, 3, 11, 8-9). The Church has always maintained this, eventually proposing it as a dogma of faith when defining the canon of Holy Scripture at the Council of Trent (1545-1563).
The composition of these gospels is rooted in what the apostles saw and heard in Jesus’ company and in his appearances to them after his resurrection.
In fulfilment of the Lord’s command, the apostles immediately began to preach the good news (or gospel) about him and the salvation he brought mankind. Small Christian communities began to spring up in Palestine and in other places (Antioch, the cities of Asia Minor, Rome, etc.)
In these communities the tradition took the form of accounts or teachings about Jesus, always under the guidance of the apostles who had witnessed them. At a third stage these traditions were written down and put together to form a sort of biography of Jesus, giving rise to the gospels for the use of the communities for whom they were intended.
The first gospel seems to have been that of Mark, or perhaps a Hebrew or Aramaic version of Matthew somewhat shorter than the one we actually have; the other three imitated its general style. In doing this, each evangelist chose some things from among the many which were handed on, synthesised others, and tailored it all for the benefit of his immediate readers.
That the four were regarded as apostolic is seen by the fact that they were received and handed on as written by the apostles themselves or their immediate disciples – Mark being the disciple of St Peter, and Luke of St Paul.
The apocryphal gospels are those which the Church did not accept as part of the genuine apostolic tradition, even though they themselves claim to have been written by one of the apostles.
They began to circulate quite early on – they are already referred to in the second half of the second century. They did not have the apostolic guarantee of the four recognised gospels; and moreover many of them contain ideas which are at variance with the apostolic tradition.
“Apocryphal” originally meant “secret”, in the sense that they were written for a special group of initiates who circulated them among themselves. Later it came to mean spurious and even heretical.
With the passage of time the number of apocryphal writings grew, mainly to fill in details of Jesus’ life which were not provided by the canonical gospels (for example, the apocryphal infancy gospels), and also to place under the name of an apostle teachings which were at variance with common Church tradition (for example, the gospel of Thomas).
Based on information gleaned from the Fathers of the Church, on extant apocrypha themselves, or manuscript references, the number of apocryphal gospels is known to be in excess of fifty. Origen of Alexandria (+ 245) wrote: “The Church has four gospels, the heretics many”.