Ahh human rights. The Equality Act is a good starting point. The drafters clearly envisaged the legality of single sex facilities provided by services providers under because there is a whole section of exceptions to the normal rule (about service providers not discriminating) concerning sex discrimination (note the Equality Act states "sex" not "gender") in Schedule 3. It includes:
One of the exceptions is that it is not discrimination to provide single sex facilities where—
(a)the service is provided for, or is likely to be used by, two or more persons at the same time, and
(b)the circumstances are such that a person of one sex might reasonably object to the presence of a person of the opposite sex.
The next section then states:
Gender reassignment
28(1)A person does not contravene section 29 (the normal rule about not discriminating when providing services to the public), so far as relating to gender reassignment discrimination, only because of anything done in relation to a matter within sub-paragraph (2) if the conduct in question is a proportionate means of achieving a legitimate aim.
(2)The matters are—
(a)the provision of separate services for persons of each sex;
(b)the provision of separate services differently for persons of each sex;
(c)the provision of a service only to persons of one sex.
So the Act allows that providing sex-segregated services does not constitute transgender discrimination providing it can be shown to be a propionate means to achieve a legitimate aim (and clearly privacy, safety, psychological and modesty considerations are recognised by the section above).
So I dont consider requiring only women to use single accommodation would be discrimination on the grounds of transgender.
In contrast I think that a female user of the rail service, if they show they are deterred from using the service, may have a claim for indirect sex discrimination if it required them to share, with self IDing TW, the single sex accommodation.
I am less clear about TW with a GRC as I am less familiar with the legislation about what their legal status vis a vis the Equality Act is.