The landmark decision
follows the case of British retiree John Walker, 66, who launched a five-year legal battle against former employer Innospec after being told that if he died, his husband would receive a pension of only a few hundred pounds a year. If Walker had been married to a woman however, she would receive £45,000 (about $58,000) annually for life.
Walker had worked at the multinational chemicals company for more than 20 years and had made mandatory pension scheme contributions like the rest of the company's employees.
After retiring in 2003, Walker and his partner entered a civil partnership in 2006 -- which they later registered as a marriage.
When Walker went to the pensions department to inform them of the change to his paperwork, he was told his partner wouldn't be entitled to the same financial protections as a heterosexual spouse.
"It completely blew my plans apart," Walker told CNN. "You've got to make sure that the person you love is going to be provided for."
Company argued legal exemption
Walker's former employer Innospec was using a legal exemption in the Equality Act to exclude same-sex partners from receiving spousal benefits paid into pension funds before December 2005, when civil partnerships became legal in the UK.
The Department for Work and Pensions (DWP) supported the company in the argument against Walker.
But on Wednesday, the high court unanimously ruled that companies such as Innospec can no longer take advantage of that exemption, calling it a discriminatory practice that breaches EU law.
Innospec told CNN they would not be commenting on the case.
Walker was overjoyed with the decision and called it "a huge step for the LGBT couples," but added that he was "saddened" that the decision had come too late for a lot of older couples who had had their pensions paid out at the lower rate.
Walker also said the ruling demonstrates that companies don't need to differentiate between same-sex marriage and heterosexual marriage anymore. "One is simply married and it should be treated exactly the same," he said.
Emma Norton, a lawyer with human rights organization Liberty who took on Walker's case, said:
"We are delighted the Supreme Court recognized this pernicious little provision for what it was -- discrimination against gay people, pure and simple."
Norton noted that as the ruling was made under EU law, it's unclear if and how it will stand when the UK leaves the European Union
, calling on the government to protect the decision.
"[This ruling] is a direct consequence of the rights protection the EU gives us. We now risk losing that protection. The Government must promise that there will be no rollback on LGBT rights after Brexit -- and commit to fully protecting them in UK law.
"How else can John be sure he and others like him have achieved lasting justice today?" she added.