How to avoid the "need" to learn more before conducting research? I am starting a PhD this Fall, and I'm absolutely terrified that I'm nowhere close enough to the "frontier of knowledge" to enable me to do quality research.

For background purposes, I have a BSc in Chemical Engineering and a BSc in Pure and Applied Mathematics. I finished both of these simultaneously in a 4 year span, as my philosophy was always that I need to be as efficient in my learning as possible and race to that mythical place where the edge of knowledge resides. The issue, however, is that it's now all too clear to me that I'll never be quite where I initially envisioned I would be before starting my PhD. 

It is also clear that I have a lot to learn before being able to contribute significantly to the project I'm being placed on, and I worry that I'll spend too much time taking classes and learning what's already known, and not enough time exploring what is not known. This is all made worse by the fact that my PhD will be mostly theoretical in nature, so I feel that the lag time between when I am done "training" and when I can start publishing papers is significant. I did a lot of experimental research in my undergrad, and it was clear to me there that this problem does not exist in as dire a form as the path I chose to go down (and that I am actually excited to go down).

To be clear I am not expecting to make monumental revelations in my PhD, and I don't think anyone is really expecting me to do that either. I am just wondering how someone that carries out theoretically/computationally focused research decides when "enough is enough" and stops taking classes. In sorting out my class schedule for this Fall, I am worried that my addiction from undergrad of taking as many courses as possible will interfere with my research, and at the same time I am not confident that I know enough to conduct research of any sort at the moment.

So if your PhD was largely theoretical and computational in nature, I guess I'm wondering how you were able to balance learning and researching? Anything you wish you did differently? Is it normal to spend a couple years accruing knowledge and not publishing much? Do you have any books/resources you recommend that deal with this sort of dilemma?
I sympathise completely with your situation, as I went through exactly that thought process when I began my PhD. I am in my second year.

I did not begin my PhD with a tightly defined research question, and I would guess that you are not doing so either. I did have an idea of what general area of research interested me and spent a lot of time looking at  published papers. Sometimes, while reading a paper, I realised that I needed more general understanding of that topic, and then read text books, or attended classes. 

I also attended seminars and such like, to get some idea about how other researchers in my general field go about their work. And I volunteered to give talks on quite general subjects in my broad field, on the basis the best way to learn a subject is to try and teach it to somebody else. I have been surprised by how much of that haphazardly gathered learning has turned out to be helpful in my own very specific research - sometimes directly relevant but more often by suggesting ideas to me about a way of looking at a problem.

I thought, and still think, that it would be a mistake to take classes and read textbooks until I was at the frontier of knowledge, because I would never reach the frontier that way.

What I did instead, after reading, more or less deeply,  a few hundred papers, was to realise that none of them really addressed a particular question that I was interested in. Having, almost inadvertently, identified a specific research question, I could then conduct a very intense literature review to confirm, or otherwise, that nobody else had researched that question.

Guess what! I had reached the frontier of knowledge. I am now in the process of seeing if I can push the frontier further out.