(This is not to comment on the underlying question of whether everyone has the potential to be a great mathematician, just a particular type of reasoning).
IQ (or more precisely the g factor) correlates not only with math but also with language skills and music[1].
IQ doesn't measure intelligence, it measures artifacts of intelligence that appear in our culture.
Also, it's a mistake to think that IQ is static. There have been studies that show wild swings in IQ over time, especially in teenagers, and even changes in the collective IQ of a culture (the Flynn effect).
In addition, it seems likely that a person could study and improve their IQ score.
The counter-argument is that although IQ tests have flaws, they are still to some degree a predictor of success in life.
I think another great example would be IQ tests in the army during WWI (and I think II?) in which one of the questions asked about a type of gun, which no one today would know, and other questions were like that as well. The point is that it measures cultural perceptions of intelligence, ie during WWI knowing your guns was considered intelligence.