This popped as a newsletter question, and it seems appropriate to share personal experience.
It is true that most significant math research seems to be done before 30. I remember Hirzebruch from my Alma Mater who had published 50% of his research by 25 - or at least that was what people said. At the same school, my Algebra professor, Jens Franke, was a year or two younger than me (see below), having already spent time at Princeton and Moscow before this. One of my teachers in grad school (economics) had 4 seminal papers in 4 different areas by 25 (and more or less retired after).
In my first semester of college, I was 25. In my first semester of math, I was 26. Being surrounded by people 7 to 8 years younger than me wasn't very encouraging - in particular the regrettable attitude of many math students to (falsely) claim that they solved an exercise you agonized over with no problem at all, and to spend 1/2 their time shortening and obscuring their arguments, probably because of a misunderstood understanding of what is elegant and cool. My first homework buddy told me what I never forgot, and have found quite true:
"If someone has a better solution than you, just assume he copied it from a better book than you had access to."
Given that my high school math education wasn't very good, for faults of my own and my teacher's, and I averaged I'd say a B+ (below my general average), with a glorious F in my final oral exam (my only F ever), I felt both inferior, and did objectively struggle at the beginning. Add to this that in informal rankings (there are no official ones in Germany) my school, Bonn, was considered one of the two best for math, and so attracted many former math Olympics participants (the most accomplished one had participated in grades 10-13, winning 2 silver and 2 gold medals). Before meeting them, I didn't even know there were math Olympics...
I worked very hard, and I think for most this is simply necessary in math. As a result, within about a year, in a crowd of about 200, I started being considered pretty good - certainly behind the math Olympics guys, but probably around there. I went on being admitted to a top 3 grad school in the U.S. - not for math as I still lacked the confidence, but with a goal to study the most theoretical part of economics (decision, game theory and such), which boils down to applying algebraic topology and other fairly hardcore math disciplines. My course work consisted mostly of taking the theoretical stats grad level classes of the first two years (in stats, my school was - then - traditionally considered as competing with Berkeley to be the top-ranked stats school), scoring consistently A's with the rare A-, and I did very well (ranked 'outstanding' and 'excellent' by my school the first two years). Being a rather troubled human being, I proceeded to boycott my own future as an academic (which is a different story not belonging here), but still my main thesis paper was 3rd rounded by Mathematics of Operations Research (with feedback "Clearly worthy of publication", asking to tie up details), before I stopped pursuing it, having gone to industry, not academia.
I'm now in my 40s, and am just done auditing algebraic topology at Columbia. 22 is certainly in itself not too old. While you say that you don't want a "do what you like!" pat on the back, I can't help giving you one. Just expect it to be tough originally, to have to work very hard (making it your life for a while), and to pretty much keep feeling that you should see things faster than you do. That's the doing math experience: every new problem is a true challenge.