South African Semenya, 32, who is classed as having "differences in sexual development", has refused to take testosterone-lowering medication as mandated by the sport's international federation, World Athletics, if she wants to compete at her favoured distance.
Semenya lost in an appeal at the Court of Arbitration for Sport and Switzerland's appeals court subsequently confirmed the decision of sport's top court.
She brought the case against Switzerland as part of her long-running legal battle.
In its ruling, the Strasbourg-based ECHR "found in particular that the applicant had not been afforded sufficient institutional and procedural safeguards in Switzerland to allow her to have her complaints examined effectively".
The victory for the 32-year-old is largely symbolic as it does not call into question the ruling by World Athletics and does not pave the way for Semenya to return to competition in the 800m.
Semenya won Olympic gold at the 2012 London Games and at Rio in 2016.