When is one 'ready' to make original contributions to mathematics? 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.
 A: Serre, recounting a discussion with Andre Weil, has said that "mathematics is not made by people with long experience, with a lot of knowledge, and so on, no. New ideas come without that."
Moreover, he has to be really interested in something. And if you are really interested in a question, and you begin reading what people have done around it, very often you discover that they have not done anything. They always talk on something else, or they made a hypothesis which is not true in your case, they have very rarely done something useful. So you reduce the literature to very little. So you have to find new ideas. But, of course, if you can find connections with something else, it helps a lot. - J.P. Serre (2003).
https://www.youtube.com/watch?v=NTZh6cuezv4&t=1612s&ab_channel=TheAbelPrize
A: It is something of a myth that everything has already been studied and that you have to master thousands of pages of prior work before you can contribute something new.
To be sure, there are some subfields of mathematics that are highly technical, and you're unlikely to be able to contribute something new to them unless you've studied a lot of background material.  However, there are also areas of mathematics that don't require that much background knowledge.  For example, Aubrey de Grey recently made spectacular progress on a longstanding open problem in combinatorics, and almost no background knowledge was needed for that problem.  Even in supposedly highly technical areas of mathematics, people sometimes come up with breakthroughs that employ very little advanced machinery.
As others have mentioned, more crucial than "knowing everything" are (1) finding a good problem to work on, and (2) having problem-solving ability.  If you have both of these, then you can typically learn what you need as you go along.  When you're at an early stage in your career, finding a good problem generally requires an advisor, unless you have the rare ability to smell out good problems yourself just by reading the literature and listening to talks.  Problem-solving ability is probably innate to some extent, but a lot of it comes down to experience and persistence.  Of course you will be a more powerful problem solver if you have a lot of tools in your toolbox, but generally speaking, you get better at solving problems by spending your time directly attempting to solve problems, and only reading the 500-page books when it becomes clear that they are needed to solve the problem you have in mind.
A: Mathematics is not learned by reading books. One becomes a research mathematician by solving problems. Most people need an adviser to recommend a good problem. Then you start thinking and reading what is relevant to your specific problem. General education by reading books with hundreds of pages can be done as a parallel process, but the main emphasis should be on a specific problem. It is a duty of 
the adviser to find a problem which does not require too much reading.
There are many examples that demonstrate these principles. Many good mathematicians obtained their first original results before the age of 18 or even much earlier,
at the time when
they learned very little.
Myself, I published my first paper at the age of 18, when I was a second year undergraduate student. I did not know much of mathematics at that time. I do not say that this paper is among my best, and at present I would not publish such a result, but this is irrelevant. The main point I am trying to make is that one has to solve problems, not to read books. It is not necessary that problems you solve in the beginning are new/publishable. But eventually you will obtain new results.
Finding a good adviser is a crucial matter, for most people.
A: I believe one is ready to make an original contribution when one understands the problem and also understands why their solution solves it.
Mathematics is meant to talk about ideas, abstractions, and truths over prestige or authority.
This topic often comes up when we stop thinking for ourselves and place mathematics in a sociological mindset. 
Instead of thinking "Why are we defining it this way? Why are the existing tools insufficient? Why does this proof work? Can I revise this theory to be more concise?", we begin to think "Man, this person wrote 1000 pages of mathematics, there's no way I could possibly understand it all." 
There is irony here: the less of some theory one understands, the more difficult it is to challenge. In many instances, one is indeed lacking key insights to fully understand the theory. But there will ALSO inevitably be instances where every member of the population assumes that some other member knows it better than they do, thus no single member attempts to challenge the theory.  Each chapter or argument may be optimized locally, but opportunities nonetheless exist in the global scope for huge simplifications.
It's important to be able to challenge the arguments. If a theory is so large and complex that amendments cannot be understood within the overall context of the theory, it is unlikely that such an amendment will be simplified or assimilated. Mathematical theories in such cases will usually undergo a process of explosion
The point being that having very large theories taking years of work to understand is all the more reason to believe that opportunities exist for contributions.
A: With the right guidance and the right project, anyone with basic mathematical maturity can contribute.
I have several papers coauthored with students who had not even started their PhD program. In fact, I started working with Mehtaab his first semester at the university.
(w. Joakim Uhlin) Cyclic sieving, skew Macdonald polynomials and Schur positivity,  Accepted to Algebraic Combinatorics, (ALCO).
(w. Linus Jordan) Enumeration of border-strip decompositions, Journal of Integer Sequences 22, No.4 (2019) 1–20
(w. Mehtaab Sawhney) Properties of non-symmetric Macdonald polynomials at q=1 and q=0, Annals of Combinatorics 23, No.2 (2019) 219–239
(w. Mehtaab Sawhney) A major-index preserving map on fillings, Electronic Journal of Combinatorics 24, No.4 (2017)
Also, I have supervised a few bachelor projects with original contributions.
There are also the REU projects, which is a summer program, where undergraduate students do actual research.
A few pointers on a successful project:

*

*Make sure the background material is available, and in particular, good   examples of similar work. I tend to collect formulas, examples, references and techniques on my web page. An excellent project for a student is to find and prove a new instance of cyclic sieving, CSP.

*It should be clear what is the expected outcome, and what tools to use. For CSP, the q-Lucas theorem is the main tool, as well as understanding q-analogs and counting combinatorial objects.

*Some/lots of help with writing.

A: As a partial answer, learn to trust peer review. When you are starting out in graduate-level mathematics you focus on proofs and seldom go beyond statements which can be exhaustively reduced to basic axioms. In some ways that is the ideal of mathematics. But, when you get to the research frontier, you might discover that you need to use a statement which is contained in paper A, which at a crucial step in its proof invokes a result from paper B, which in turn invokes papers C, D and E, ...  It could perhaps take months of work to see how that single statement ultimately follows from what you currently know. If you plunged down every such rabbit hole you encountered, it is unlikely that you would ever make progress. Exhaustive background knowledge is not a prerequisite for the creation of new knowledge. You can explore what follows from what is currently known, without first reducing what is currently known to first principles.
A: I put myself in a position where I could contribute to mathematics without needing to publish.  I don't suggest spending half your time on MathOverflow as a career substitute or career booster. However, thinking about a variety of problems allows you to make connections to things you have studied and to define and modify your areas of interest.  Good participation on this forum can be a contribution to mathematics.
Alain Valette was kind enough in a paper to mention an example https://mathoverflow.net/a/64754  of mine to a question of his. It is a contribution on a small scale, but one of a growing collection of mine based on my activity here. I encourage you to share some of your contributions here, through questions, answers and comments.  It will prepare you for the kind of contribution off MathOverflow that you may wish to make.
Gerhard "Come And Join The Party" Paseman, 2019.08.24.
