The decision overturns a ruling reached last year by the High Court, which refused to accept same-sex marriages conducted outside Namibia.
Two Namibian nationals had sought recourse from the courts after the ministry of home affairs and immigration refused to grant permits to same-sex foreign spouses whom they had married outside the country.
"This Court accordingly found that the approach of the Ministry to exclude spouses, including the appellants, in a validly concluded same-sex marriage... infringes both the interrelated rights to dignity and equality of the appellants," the ruling said.
Annette Seiler, who is married to German national Anita Seiler-Lilles, brought the case along with Namibian citizen Johann Potgieter and his South African husband, Matsobane Daniel Digashu.
Their marriages were respectively concluded in Germany and South Africa
Namibia has seen a flurry of court cases on the rights of same-sex couples to marry, become parents and immigrate.
Homosexuality is illegal in Namibia under a rarely-enforced 1927 sodomy law dating to its period under South African rule.
South Africa, under its liberal post-apartheid constitution, is the sole African nation which allows gay marriage, legalized in 2006.
In March this year, the same paramount court overturned a decision by a lower court to grant citizenship to a gay couple's four-year-old son who was born in neighboring South Africa through surrogacy.
Your browser doesn’t support HTML5