I agree that hard work and stubbornness are very important (I think we should all take after Wiles and Perelman as much as we can). But it is also important how you spend the many hours you dedicate to mathematics. For instance, choice of problems is quite important: it is important to make sure that when you work on something, you spend your time usefully, i.e. you not only make progress on this particular problem, but also learn something new about mathematics in general. It is also important not to get hyperfocused on a fruitless attempt to solve a problem; after some time and effort spent on it, it becomes addictive. In such a situation, it is sometimes better to stop and ask for help/read something or switch to another problem for a while. Often, you'll wake up one morning a month or a year later and see that the insurmountable obstacle has magically disappeared! Or maybe this "Aha!" moment will come during a discussion with another mathematician, or while listening to a talk. For many people it is also helpful to have many simultaneous projects, so that when you get stuck on one, you can work on another. To summarize, I think that not only the number of hours matters, but also how efficiently you spend them, not only in terms of publishable results, but also in terms of your personal growth as a mathematician.