Well, there's more to it than just how hard you work or your intelligence. False dichotomy. You also have to work smarter, not just harder.
I'm convinced that a lot of the ingredients of my thought processes that have made me reasonably successful in math are present in just about anyone. Maybe not enough of the ingredients for anyone to be able to do it. I don't know. But it's partly a matter of how you study, rather than having innate abilities.
My own path to figuring out the best way to learn was long and convoluted, so it is not easy to communicate. I still don't know what the best way is for sure, and the answer to that question is different for everyone, although there are some general principles that I think everyone can take advantage of.
So, I don't know to what extent doing math depends on ability and to what extent it depends on working hard and working in a smart way. It's very hard to tell the difference between innate ability and just having a better way of doing something that someone else could use if they were only aware of it. Unless you can do a deep investigation of how people are thinking, it's practically indistinguishable.
Based on my experience doing research, I would say hard work is probably more important than intelligence. There's just so much work that has to be done in order to do the job. So, if you don't work hard enough, it's seems like a bigger problem than not being smart enough. If you're smart, but don't work hard, you can't get anything done. If you are not smart, but work hard, you might not get the most high quality work done, but at least you'll get something done.
I suppose the distinction between work and intelligence is that work is something you can choose to do. But getting yourself to work hard is also a sort of talent, I think. One of my problems is that I find it hard to concentrate and focus on things. So, I can work for 4 hours easily, but the question is what kind of quality work am I going to do. Maybe I will get distracted and think about something else or just not proceed with enough enthusiasm or confidence. So, it's not just a question of deciding you are going to work harder. That's easier said that done. The trick is to be really interested in what you are doing.