The first four books of the New Testament are anonymous in the sense that the names of the authors do not appear in the respective texts. However, there is no evidence that any of the canonical Gospels ever circulated without a title, and the only extant appellations are "According to Matthew," "According to Mark," "According to Luke," and "According to John." In fact, Tertullian of Carthage (ca. 160-220) was highly critical of the idea of a Gospel being published without its official designation (Adv. Marc. 4.2), and there is no manuscript support for the groundless assertion that the titles were not added until the second century. It is inconceivable that such significant writings would circulate anonymously for decades, or that the names of the real authors were lost and then replaced by fictitious monikers without any variations in subsequent years.
Early and consistent testimony ascribes authorship of the First Gospel to the apostle Matthew Levi. The oldest surviving reference is from Papias of Hierapolis (ca. 60-140), while others include Irenaeus of Lyons (ca. 115-202), Tertullian of Carthage (ca. 160-220), Origen of Alexandria (ca. 185-254), Eusebius of Caesarea (ca. 263-339), and Jerome (ca. 347-420). No other name was ever appended to Matthew’s Gospel.
The invariable title of the Second Gospel has always been, "According to Mark." The earliest attestation is that of Papias of Hierapolis (ca. 60-140), with comparable testimonies from Justin Martyr (ca. 100-165), the Anti-Marcionite Prologue (ca. 160-180), Irenaeus of Lyons (ca. 115-202), Clement of Alexandria (ca. 150-215), Tertullian of Carthage (ca. 160-220), and Jerome (ca. 347-420). No one from the early church ever denied this claim or proposed a different author.
Luke’s authorship of the Third Gospel is also affirmed very early and includes the Muratorian Canon (ca. 170), the Bodmer Papyrus XIV (ca. 200), Irenaeus of Lyons (ca. 115-202), the Anti-Marcionite Prologue (ca. 160-180), and Eusebius of Caesarea (ca. 263-339). Lukan attribution is unvarying (see Authorship of Luke-Acts).
The earliest extant reference to John’s authorship of the Fourth Gospel is that of Irenaeus of Lyons (ca. 115-202), whose testimony is based on the corroboration of Polycarp, a contemporary of the apostle John himself (cf. Eusebius, Eccl. Hist. 4.14.3-8; 5.20.5-6; 20.4-8). Other testimonies include the Muratorian Canon (ca. 170), Clement of Alexandria (ca. 150-215), Theophilus of Antioch (ca. 181), Hippolytus of Rome (ca. 170-235), Origen of Alexandria (ca. 185-254), and Eusebius of Caesarea (ca. 263-339). With the exception of the heretics mentioned by Irenaeus (Adv. Haer. 3.11.9) and Epiphanius (Haer. 51.3), no one seriously questioned the authorial role of John until 19th-century critical scholarship.
During the period approximating the composition of the New Testament documents, particularly before the widespread use of the codex, a work was typically identified by a tag on the outside of the scroll. How likely is it that any of the Gospels would have been left unidentified, especially if they were meant to be passed around and read by a wide audience? There had to be some way to distinguish between them as they circulated. The fact remains that the unanimous testimony of the early church is that the canonical Gospels were written by the men whose names they bear.
--Kevin L. Moore
Related Posts: Biblical Authorship Part 1, Authorship of Luke-Acts, Introducing John's Gospel
Helpful Resources: S. J. Gathercole, "Titles of the Gospels," ZNW 104.1 (2013): 33-76.