Almost anyone can learn how to play sports, or sing, or play instruments. It just takes time and determination. The ones that "make it big" also have luck on their side, but there are plenty of unknown people with equal skill.
Sure, legitimately dumb people will have trouble with knowledge work... but average intelligence is more than enough. The problem is that software is still a relatively new field and we haven't learned how to teach it yet.
I think we're still too focused on implementation details. Language is the medium for expressing ideas, incoherent or poorly developed ideas indicate someone that hasn't learned how to think about the domain yet. When mentoring students or doing code review for new hires, I've found tremendous value in focusing on questions and pointers to software/framework patterns instead of line-level errors. The little stuff matters, but those problems are often driven by higher level complexity.