To the best of the knowledge of the Church of the time they were written by the Apostles, so even if they were written by children in a sweatshop in the third world and then transported to the past with a time machine it would not be a case of the church lying about their origins.
The Church put considerable time and effort into figuring out which were pseudopigraphical and tossing them aside.
I've never seen or read anything to indicate they were not written by the attributed apostles, if you're meaning Ehrman's book, I think it has been discussed here how loose he was with the word "forgery". Under his definition if you write something on a computer and print it off, it's a forgery since you didn't actually put it to paper.
And as has been mentioned, the full names of the gospels include the "According to...."