You could do worse than to listen to Hamming:
http://www.paulgraham.com/hamming.html
But, having said that, when you ask:
Is it dumb luck, inherited gift, or the result of a process that can be learned?
The answer is "all of the above". You need to follow good procedures that you will learn with experience, you need to have certain qualities, not the least of which are social skills -- bad research well described will trump brilliant but poorly-presented research every time -- but do not underestimate the role of dumb luck. For every awesome research problem that turns out to be tractable, there are many that just don't pan out.
There's a story I heard about Feynman. They say that Feynman used to take on grad students, and they would ask him what to work on. Feynman dreaded these questions. If he told a student to work on Interesting Problem X, and (s)he labored on it for years, only to find that it was intractable and therefore ultimately uninteresting after all, he was afraid the student would be terribly depressed, as depressed as only a late-term Ph.D. student can be. The story was that Feynman would tell the students to come back in a day or two, then take a problem and frantically work it out as fast and as far as he could in a day, trying to get a few years ahead of the student in a few hours, far enough ahead that he could be confident that an answer was likely to exist. Then he'd hide all his notes and present the problem to the student as an interesting and novel new idea.
Unfortunately, if you aren't a theorist, and your adviser isn't quite as smart, conscientious, and downright devious as Richard Feynman was, you'll be a normal grad student: You'll work away on a problem, and maybe it will be exciting, and maybe it will be boring, and the odds are on boring. [1] The secret is not to worry about this. If you want a successful research career, just keep moving from problem to problem: Finish your thesis (yes, with a stapler if you have to -- when you gotta finish, you gotta finish) and then devote your postdocs to finding a better problem, using all those Hamming-inspired skills you've been working on.
---
[1] One truism: By the time you finish your thesis you are likely to be so bored with your own project that you will want to scream. Even if your project, properly presented, is actually pretty exciting to the independent observer. You lose perspective in your fifth or sixth year. That's why it's more important to keep moving than to hold out for the perfect project, or the golden dissertation.