How and when do I learn so much mathematics?
The other answers have some good general advice. Let me try to say something that is specific to the topics of analytic number theory, and number theory generally.
First, there is no such thing as training to be a number theorist. There are many different kinds of number theorists, and very few of him are comfortable with all four of the works you mention here (Davenport, Vaughan, Deligne-Weil II, Tate' thesis). Very few analytic number theorists understand the proof of Weil II (though a lot more of them know something about how to use it). Very few algebraic number theorists are comfortable with all the standard argument in multiplicative number theory and the circle method (though a lot more know the key results about $L$-functions). Of course the division into analytic and algebraic is already too coarse and simple. What you have is a lot of different number theorists with distinct but overlapping areas of knowledge.
Analytic number theory specifically is one of the areas of Math famous for requiring relatively little knowledge (at least, when compared to other areas of Math ). If you like the stuff you read in Davenport and Vaughan, you're in luck! You may be a lot closer to the frontiers of research than you think. As for how exactly to get there, I agree with Timothy Chow that your adviser is the best person to figure this out.
As to this phenomenon:
When I look at some of my professors or other researchers I have interacted with, I notice that they may be publishing in one or two areas, but are extremely knowledgeable in pretty much everything I ask them about.
Their knowledge may be less than you think. Or more precisely they know a broad overview of what the idea in a given field are and how they are used, but not the details. This might match the questions that someone with less experience in the area would ask them, but not be sufficient to write a good research paper in that field.
However, it is by no means a parlor trick. This type of knowledge is very important because it suggests what research areas might be relevant for a given problem and thus who to talk to, what to read, etc. But it's not obtained from reading books! Probably the best way to attain this level of knowledge is attending seminar talks (and listening carefully, not being afraid to ask stupid questions, thinking about what the speaker is saying during and after the talk...)
I think in general, a recipe for success on a particular problem or research sub-sub-area is to know (1) everything, or as much as possible, about the techniques that have been used to attack this problem before and (2) one relevant thing that hasn't been used to attack the problem before. The point being that you only need one new idea to make progress, but you will likely have to combine it with all or many of the previous ideas.
So if you know which problem, or type of problem, you want to work on, you should learn diligently the topics of obvious relevance to that problem. For topics of unclear relevance, you do not need to learn everything to their fullest extent, as long as you do not completely abandon them - again, you only really need one new idea. Even (2) is not strictly necessary - plenty of progress has been made by applying the existing methods with a more clever strategy.
But if you have a natural inclination to read and learn everything, you will probably find success as a mathematician by knowing at least a few things that your competitors don't. Focus on what seems relevant to your areas of greatest focus and ideally what seems fun and interesting as well. But there's no need to drive yourself insane.
It may seem like a mountain. But remember that a few years ago you knew absolutely nothing, and you have mastered a lot of material already! Three or four years is a lot of time, and almost certainly enough to become an expert on one thing (maybe even two). You can always expand later, but it's useful to keep your eyes open already. Attend seminars, organise learning groups, find peers with similar interests (and maybe some with different interests too!).
One major change going from undergrad (especially European undergrad, which is structured much more linearly than its North American counterpart) to a PhD programme is that you need to work on 'top down' learning instead of 'bottom up'. Try to understand the general ideas first before learning all the details. This takes time (just like the first year of undergrad took time to adjust), but it gets easier, and adjusting to this early will probably help a lot.
Attending seminars you don't understand is valuable, because you learn by osmosis. Someone will say something you don't understand, and you can go home and read about it in your own time. Or not, because you won't always be able to. But the next time it gets mentioned it will be less confusing, if only because you have seen it before.
Here is what my experience on the topic is: During writing my own thesis I was focused quite narrowly on the topic and everything which would help me prove the results I needed. That already meant learning a lot of new (to me) and exciting (to me) mathematics. After completing the thesis my experience has been that my mathematical world gradually expanded. It often seems to happen to me that I stumble into talks and on results which at first sight seem unrelated to what I do and then reveal themselves to be connected to my own work (or give rise to new and interesting projects). So to answer your questions:
- Depends on what you want to achieve. Certainly you do not want to be completely ignorant at what is going on in mathematics or in neighboring topics. Having said this, it is very easy to get lost in the process of reading new fascinating math and loosing track of ones own projects.
- I think it is good, especially at the beginning, to focus on some topic but keep an open mind. At least for me, working on multiple problems came at a later stage (and it might be argued whether this is keeping one from doing enough works on the project). However, this might be different from person to person.
- Personally, I quite enjoy connecting different areas of mathematics. It seems to me that I am quite often discover new areas and am learning new things all the time (though that might also be different for other people).
Finally, let me tell you that seniority has the benefit of experience in playing the mathematical game. On one hand it should come at no surprise that people who have been working years and decades in academia have a rich knowledge base on which they can draw to ask questions. Moreover, as one of my academic teachers liked to point out: A little knowledge about a field is more then sufficient to ask an intelligent question. While the senior people might not have detailed knowledge to work on a problem in a neighboring field, they certainly almost always know enough problems and keywords to ask something after a talk.