The 4th Gospel is, formally speaking, anonymous. That is, the author never explicitly states his name. Even though we call the book “According to John” or the “The Gospel According to John,” it is not certain that these titles were original to the work itself (more on this below).
For this reason and others, many have tried to posit a different author than the apostle John, the son of Zebedee. Suggestions have ranged from an “elder” named John who lived after the time of the apostles to a Johannine community, established by John but operating past John’s lifetime. While not 100% provable, I do believe there is good reason to accept that John the apostle wrote the 4th Gospel himself.
Consider 21:24 where the author says: “This is the disciple who testifies to these things and who wrote them down. We know that his testimony is true.” “This” refers back to “the disciple whom Jesus loved” in verse 20. We know from this text and others that the author uses this phrase for the apostle John, one of the three apostles in Jesus’ inner circle (the others being Peter and James). It would seem that it is reasonable to accept what the text says (especially if one holds to the inspiration of the Bible): “the disciple whom Jesus loved,” a common phrase for the apostle John, is the one who wrote the book. For whatever reason (modesty?) he simply chose not to explicitly centre himself out.
In addition to this internal evidence, there is strong external evidence to support the authorship of John. I mentioned above the titles often given to this book. These titles are present in our earliest manuscripts. They may have been placed there once the four Gospels started circulating together (some hold that they are indeed original to the autographs) but this at the very least shows that early on Christians believed this book was written by John. The Early Church Fathers (with the exception of Papias, as recorded by Eusebius) are fairly unanimous in their testimony that John wrote the book.
For these reasons it appears quite reasonable to accept that John wrote the 4th Gospel.
As far as the date of the Gospel is concerned, if the apostle John is the author, then we must place the date of writing within the 1st century, given that he died before the century elapsed. Indeed this is likely based on another piece of external evidence: we actually have surviving today a fragment of a manuscript of John’s Gospel that is dated to 125 A.D. Therefore the Gospel has to be earlier than this, and likely much earlier since this manuscript is probably not the original handwriting (known as the autograph).
From here, it becomes harder to be much more specific. Scholars vary on their dating of this Gospel, ranging from 55-95 A.D. (Carson, 82), if we ignore those who would disagree with the previous paragraph. Since I have not yet pinned down my opinion on the date, I am going to leave further speculation until after I have finished these studies (noting anything significant to the issue along the way if possible) and it will be interesting to hear from a scholar I am currently interviewing as to his opinion. Expect that interview early next week.