As far as I'm aware, the gender of a married person in the UK is taken from their birth certificate. That's why, for many years, it was impossible for, say, a post-op transsexual woman to marry a man - even if her sex had changed on their passport, driving license, etc - because her birth certificate still listed her in her birth sex, ie. male. So when transsexuals managed to get marriage legalised, the way it was done was to allow them to change the gender given on their birth certificate, so for legal purposes they were now born female and could thus marry a man (and vice-versa for FTMs).
The fact that marriage depends on birth certificates also, however, means that an MTF who stays with her wife can still legally be married, in the old-fashioned man-and-woman sense until such time as she chooses to change her birth certificate. Because if she doesn't change it, then she's still a male husband of a female wife, so far as the law is concerned.
But if an MTF changed her birth certificate to female and THEN married another woman, that would constitute a 'gay marriage'.
Confusing, huh?! 🙂