Fees for those bringing employment tribunal claims have been ruled unlawful, and the government will now have to repay up to £32m to claimants.
The government introduced fees of up to £1,200 in 2013 to reduce the number of malicious and weak cases, but that led to a 79% reduction over three years.
Trade union Unison argued the fees prevented workers accessing justice.
The Ministry of Justice said the government would take immediate steps to stop charging and refund payments.
The Supreme Court found fees ruled the government was acting unlawfully and unconstitutionally when it introduced the fees.
Unison general secretary Dave Prentis said: “The government has been acting unlawfully, and has been proved wrong – not just on simple economics, but on constitutional law and basic fairness too.”
He added: “These unfair fees have let law-breaking bosses off the hook these past four years, and left badly treated staff with no choice but to put up or shut up.
“We’ll never know how many people missed out because they couldn’t afford the expense of fees.”
The government had already made a voluntary commitment to reimburse all fees if it was found they acted unlawfully. Fees have raised about £32m since being introduced.
Fees ranged between £390 and £1,200. Discrimination cases cost more for claimants because of the complexity and time hearings took.
The Supreme Court found this was indirectly discriminatory because a higher proportion of women would bring discrimination cases.
It also said that some people would not bring cases to employment tribunals because paying the fees would render any financial reward pointless.
The court’s summary added claimants in low or middle income household could not afford the fees “without sacrificing ordinary and reasonable expenditure for substantial periods of time”.
TUC general secretary Frances O’Grady said it was a “massive win” for workers.
“Too many low-paid workers couldn’t afford to uphold their rights at work, even when they’ve faced harassment or have been sacked unfairly,” she said.
The decision was welcomed by employment lawyer Karen Jackson, who said: “I don’t know an employment lawyer who didn’t think it was wrong to have fees.
“We all felt that morally it was the wrong thing to do as a barrier to justice.”