Orongo, do this:
T.Gender = categorical(T.Gender);
works as you expect, and what you are really asking about is this
Long story short: Gender in the mat file is what's called a cell array of char vectors (a.k.a. a "cellstr"). Those don't support testing using ==, thus KSSV's suggestion of strcmp. But if you convert them to categorical, you can use ==. You could also convert to string, but categorical is more appropriate in this case.