You are assuming a straightforward path: Everything written was in the canon, and then things were selectively removed. (I'm also going to stick to only speaking about New Testament apocrypha, as I think that's what you're talking about.)
That's not how it happened.
(1) Speaking of 'a canon' in the early Church, is, well, a little rough on the early church and it's not clear if it's appropriate. There were a lot more Church writings going around than we now have. It's not clear how early these started to percolate into 'collections', as opposed to 'here's everything we got, boy howdy', but definitely by the time that emperor Constantine asked for 50 bibles there was SOME idea of 'core books'... because if nothing else, his request created a need to identify 'core books'.
(2) Debate about the bible lasted for a long time. Some of the Pauline epistles were accepted far later than the rest of the books (more on that below.)
(3) 'Orthodoxy' and 'heresy' were pretty fluid in the early centuries of Christianity. Things weren't quite 'settled', so one man's orthodoxy is another's heresy. Bauer is the main proponent of this idea; I also like how Boyarin took that idea and ran with it, arguing that the idea of 'heresy' (specifically in the context of Judeo-Christian relations) was evolving and involved a dialogue.
There is evidence of an early consensus on some of the books of the New Testament because of Irenaeus, but even there there is significant variation in the texts of those books, as this work attempting to figure out the exact source of Irenaeus' bible quotes makes clear. For more on Irenaeus, this section of Against Heresies has some good quotes. I especially recommend searching for 'four zones'.
So the 'canon' is relatively fixed by 200 AD, because we can see it in Irenaeus' works but is still missing some books (notably, some Pauline Epistles and the Apocalypse of John, the latter of which was rejected by Eusebius). We're not quite sure when it began but the current trend is to view it as a relatively fluid process, instead of one person (Irenaeus/Marcion) laying down the law and saying 'these are the books I trust.'
Where does The Gospel of Thomas fit in this?