Now several things make up that talent. Logical thinking, good at math, problem solving, attention to detail, knowing how to break down a problem into smaller pieces, troubleshooting, etc. Not all are required for some types of programming. The levels of proficiency required in those things also varies.
BUT, if someone doesn't possess any of those skills then they're not going to be able to program much at all. Even if they wanted to they're not going to go far and trying to teach them will be futile and frustrating.
Many people can be taught to program but their brains have to be wired at least a little bit to be able to do some/all of those mental skills. There has to be something already there to build on even if it's still just a tiny seed. That's talent.