Under the terms of his work contract, the doctor at the hospital in Düsseldorf had agreed to uphold Catholic teachings in his personal life.
But after he divorced in 2008 and remarried in a civil ceremony, the clinic where he worked decided he had breached the agreement and fired him.
Remarriages posed no problem for the clinic when sought by fellow doctors belonging to the evangelical church or with no religion at all — prompting the Federal Labour Court (BAG) to find that the firing was unfair discrimination.
Wednesday's ruling confirms a 2011 judgement by the labour court, which was at first overturned by Germany's Constitutional Court, the highest in the federal republic.
Judges there ruled that the labour court's decision infringed too far on the church's independence from the state.
But this time around the BAG's ruling is backed up by the European Court of Justice (ECJ) in Luxembourg, which disagreed with the constitutional court.
SEE ALSO: Here's how to marry a German as an expat
Editor's note: This article was updated to reflect that the hospital is in Düsseldorf, not Frankfurt as originally reported.