I would suggest the following perspective: Your goal in research is to prove something new. Learning what other people have done is just a means toward that end. In particular:
- Obviously, a result isn't new if someone has already proved it, so before you can claim novelty, you need to check that your result isn't already known.
- It's usually—though not always!—much easier to prove something new if you stand on the shoulders of giants.
So it's not really necessary to know in great detail everything that has already been done. To ensure that the question that you're trying to answer is new, you only need to know what has already been proved, and not how it was proved. As for standing on the shoulders of giants, if you pick a random paper in your field and see what previous work it really relies on (as opposed to citations that just provide context and motivation), you'll typically find that it relies only on a small amount of the existing literature. Of course, this will vary according to the field, because some fields are more technical than others and require lots of background knowledge, but even then, no paper relies on everything that has been done before. It's common practice to cite a lot of prior work, but this is done mostly to provide context and motivation, and to avoid offending people by inadvertently omitting their name, not because the author knows all the prior work in detail.
I typically take something like the following approach. I pick some unsolved problem that I find interesting. Then I try to prove a partial result, using just what I already know. Typically, I will find that what I've proved is already known. In that case, I'll look closely at the paper that anticipated my result, and study it in detail to see how they proved it. Did they prove it the same way? Is my approach new even if the result isn't? Can I extend either my approach or their approach to push the frontier forward? Iterating this process, you should eventually be able to prove something new, and along the way, you'll master some techniques which should serve you well in the future.