The case was brought by Rasmus Laubscher, the brother of Daniel Laubscher who died in 2015.
He argued against his brother's estate going to his live-in partner Eric Duplan.
The Constitutional Court said the Civil Union Act created a new category of beneficiaries, namely same-sex partners who had entered into registered civil unions.
"As a result, the court’s earlier inclusion of permanent same-sex partners within the definition of spouse was still operative,” Judge Boissie Mbha said in a majority judgement.
The Commission for Gender Equality, a statutory body formed after apartheid ended in South Africa in 1994, supported Mr Duplan in his inheritance battle.