All kinds of mental talents can be helpful for learning to code, but tenacity is probably the most important. Better learning materials can be great, and they're getting better all the time, but they are still no substitute to an unshakable commitment to being a developer.
For my 12th birthday in about 1980, my grandparents heard I liked computers and bought me a college level textbook on microprocessors. I didn't understand a word of it when I first read it really. But I did read it, and re-read it, for a couple of years. And it's one of the key reasons I wasn't afraid of doing assembly language a while later when I got my first computer. The book was a terrible way to learn, and it was completely at the wrong skill level for me. But I was really into it and made up for my lack of capability with a tremendous commitment and huge amount of time, slurping up every bit of information on computers I could find.
You've only lost when you quit fighting.