Graduate Admissions Gender Bias
I have had people I know who are senior mathematicians tell me in private conversation that they believe it is right and proper to discriminate in favor of females in mathematics in things like graduate admissions and job hiring. In some cases they essentially admitted (in a circumspect, plausibly-deniable sort of way) to practicing this kind of discrimination themselves.

Based on these anecdotal experiences, I believe it is indeed quite possible that you were discriminated against. It’s also possible that you weren’t; there is simply no way to know for sure. It’s not even clear that there is an objective underlying truth to this question, since the notion of what it means to be discriminated against isn’t scientifically defined.

The people I mentioned are people I respect and believe to be quite sensible, well-intentioned people. Their views seem to be widely held among professional mathematicians in (US, and other countries) academia today, including many people whom I would characterize as very reasonable and moral. On the other hand, many other members of the academic math community disagree and believe that gender based discrimination in math and science is unethical and unfair regardless of which direction it takes place in. So no, you are not the only one, far from it.

I don’t think there is a legal remedy for this issue. Who will you sue? How will you prove that a specific program or person discriminated against you? Besides, the societal debate about affirmative action has been going on for several decades and doesn’t seem about to end. There have been numerous lawsuits with results going both ways. The battle lines move a little, then move the other way. Laws are passed, then get ignored or worked around. At the end of the day, there is simply a wide chasm in our society over the belief in the morality of such actions, and no law or court can change that.

For math specifically, the issue will likely subside in importance over time as the number of successful women mathematicians grows closer to (or reaches parity with) that of men in the profession and a younger generation takes over that doesn’t carry the baggage of the older generation and is baffled by the very notion that it was once believed women could not succeed in mathematics.

I understand that all of this big-picture stuff might offer only small consolation for you in your personal situation. It is reasonable to be upset, but keep in mind that most women also have plenty of things to be upset about, and while two wrongs don’t make a right, statistically speaking, you will probably end up getting just as much of a chance as your girlfriend to prove your worth as a budding mathematician, and you will probably be at least a little bit advantaged over her in other ways that you may not realize. 

Life isn’t completely fair for anyone. Go out there and succeed anyway! Good luck!