Usually, it will depend on whether their decision is justified based on all the facts and circumstances.
If a service provider chooses to offer a single-sex service based on sex recorded at birth, they may exclude trans people of that sex recorded at birth (i.e. exclude trans men from a women-only space) only if this is justified as a “proportionate means of achieving a legitimate aim”.
A single-sex space based on sex recorded at birth may be discriminatory against trans people of the opposite sex recorded at birth (i.e. if trans women are excluded from a women-only space) because they may then lack any appropriate service provision. The service provider will also need to be able to justify their policy as a proportionate means of achieving a legitimate aim. It will usually be challenging for service providers to do this if they have not offered reasonable alternatives for trans people.
In some situations, whether a business or organisation can legally exclude a trans person might depend on whether they have a GRC. As we explained above, lots of the specific law governing the provision of single-sex spaces is not in the Equality Act and some will still be governed by the Gender Recognition Act and not adopt a sex recorded at birth approach.
For example, access to single-sex cubicle toilets (i.e. toilets that are in cubicles, rather than a separate lockable room) may depend upon whether you have a GRC because the meaning of “sex” in the Workplace (Health and Safety) Regulations 1992 may be governed by the GRA. These Regulations require that, if workplaces are providing cubicle toilets, they must offer “sufficient” single-sex cubicles (although employers could provide unisex cubicles as well. These Regulations probably mean “single-sex” according to certificated sex, applying the default position in section 9(1) of the GRA.