Here I take the narrow perspective that a "great mathematician" is one who ultimately is considered to have made a great contribution to the body of mathematical knowledge. Again, as is forgotten in so many answers to similar questions, it is worth saying that it is impossible to give a good, empirically based answer ... the best one can do is look at those people who are recognized as great mathematicians and try to determine, inductively, what traits and life-circumstances they share.
Here's my list
- Win the ovarian lottery. No matter her innate potentialities and abilities, the chances that a female born today in Eritrea will become a great mathematician is vanishingly small in comparison with the very small possibility of a male born today in the United Staes.
- Hope that the ovarian lottery not only endowed you with good life circumstances, but also a modicum of smarts
- Work hard but don't work alone. Mathematics today is very much a community effort. Although some results are hailed as if they were the solitary work of a lone genius, it is rarely the case. Even Andrew Wiles, whose work on the Fermat problem involved a great deal of out-of-sight solitary work, not only built on a vast edifice of mathematics built by others but ultimately sought help from another mathematician to help plug the holes.
- Get into a good university, find a mentor whose approach meshes with your own, and seek assistance when you get stuck. Working on problems diligently is clearly an important part of becoming a mathematician, but there is no shame and a great deal to be gained by seeking someone else's viewpoint when you are utterly stuck (particularly as a student).
- To become well recognized, and hence to make a contribution to the vast body of mathematical knowledge, you must publish.
- Remember, that your goal was to become a great mathematician. Most great mathematicians do not receive the Abel Prize, the Fields Medal or the MacArthur award. Euclid died before they were available (if he ever actually existed); So too did Emmy Noether and countless others ... and now there are far to many great mathematicians for all of them to be awarded one of the limited number of (distracting and essentially irrelevant) prizes available.