The case brought by For Women Scotland concerned the definition of a “woman” under equalities law.
It specifically surrounded the interpretation of the 2010 Equality Act, which applies across the UK.
For Women Scotland argued that “woman” referred to people that are born female and sex-based protections defined in the act should only apply to them.
The Scottish government contested that transgender people with a gender recognition certificate (GRC) were entitled to the same sex-based protections.
Judges unanimously ruled in favour of For Women Scotland in the case.
The Equality Act still offers protection to trans people, and the ruling did not affect the protected characteristic of gender reassignment.
The ruling meant public bodies had to review gender policies on things like toilets, changing rooms and hospital wards and establish whether they were affected by the legislation.
The Scottish Parliament reviewed its policies and designated male and female only toilets, however retained gender neutral facilities alongside them.
Others are still considering how they will update their guidance and practical facilities.