I don't know the difference between sex and gender, but in terms of whichever one refers to biological state, this person is a male, unless science has found a way to rewrite peoples' chromosomes recently.
It is likely that this person's chromosomal sex is male. It is possible (I am not familiar with her case) that she was born XXY or another chromosomal abnormality that would make her of ambiguous or questionable chromosomal sex. Chromosomal sex is not usually used as the primary measure of sex for this reason.
Biological sex also includes primary (in this case surgically modified) and secondary sexual characteristics (in this case modified by hormone therapy) and internal organs--ie presence of ovaries (in this case, we can assume she does not have ovaries).
A minority of individuals are born with particular physical conditions--hermaphroditism would be a catchall term--that makes the determination of their sex difficult at birth. Some of these individuals, particularly in developing countries, do not discover their actual sex until later in life.
By some measures her biological sex would be male, by others female. The determination of whether her birth characteristics are important or her current characteristics should be made on an ad hoc basis depending on the reason for which sex is necessary to talk about. Her gender is unambiguously female.
And since it's normal throughout society for people to be excluded from certain activities based on how they were born (such as males (people who live their lives as males in this case) being excluded from female beauty pageants), I don't think you can call it unjust that she was disqualified here.
Generally when we exclude people from activities on the basis of their characteristics, we make a credible link between the characteristic and the activity.
For example, when we exclude a quadriplegic from hiring to be a cashier, it could be because one of the responsibilities of being a cashier requires active movement, and another requires lifting a particular class of weight. If, on the other hand, another job did not require activities the quadriplegic was incapable of, they would be free to apply for that job, and should not be excluded from it for that reason.
I think you can pretty credibly argue that, based on the premise of such a competition, having the appearance of a female (and indeed a particular sort of female) is intrinsically linked to the competition. I think it's fair to say that whether this particular woman is your cup of tea, she certainly isn't totally out of the ballpark for a competition like this. That is to say if you were to pull 100 contestants in this competition, some would be less physically attractive than her and some more.
Athletics competitions make a credible connection between a person's birth genetics and their physical development, and forbid particular hormone regimens of non-transgendered persons as well. It's not clear that such a credible argument can be made here, because as mentioned non-transgendered persons are free to "cheat" when it comes to their appearance. So it's not the surgery that precludes it. Competitors are allowed to use hormonal birth control to circumvent apparent disadvantages (IE skipping their periods), so we can't credibly argue that this competitor is cheating by lacking an ovary.
I don't see a credible connection between chromosomal sex and this competition that doesn't boil down to "People are weirded out by transgendered people". If you can provide one, please let me know.
I would suggest that perhaps the strongest connection I do see would be the winner's role in being a spokesperson to young women, which could credibly involve particular responsibilities related to body image or experience living as a young women. I'd personally argue that a transgendered woman is probably more sensitive than most to body image issues, but I think this is probably the most credible route to take. It would also raise an interesting question about a transgendered or intersex individual who began their transition while a toddler or a small child, and so would clear any hurdle imposed by this requirement.
Finally, any hypothetical requirements are moot because the contest hasn't clarified such a requirement before she applied and hasn't cited such a requirement in firing her. Doing so now would be post hoc, so they've already ceded that they don't have a clear public-facing reason for doing so