This is quite a philosophical, soft question which can be moved if necessary.
So, basically I started my PhD 9 months ago and have thrown myself into learning more mathematics and found this an enjoyable and rewarding experience. However, I have come to realise how much further I still have to go to reach a point where I could even think about publishing original contributions in the literature given how intensively everything has already been studied and the discoveries already made.
For example, I have just finished a 600 page textbook on graduate level mathematics. Although it took me a while to understand everything in it, I learned from this and enjoyed doing the exercises, but realised by the end that I still basically know nothing and that it is really intended as a springboard to slightly more advanced texts. I picked up another book which starts to delve more into one of the specific aspects in the book and again, it is 500 pages long.
Do I have to read another 500 page book to get a sense of something more specific which I can contribute? At this rate, it will be years and years before I am ever able to publish anything.
Later: I am reading this a few years later and realise the question could be hard to answer, as depends on many things (there are some problems where one could contribute decisively without knowing any math at all). However, I will leave the question as I think it's something that many students ask themselves and there is some useful generic advice in the answers.