Adrian Smith lost his managerial position, had his salary cut by 40%, and was given a final written warning by Trafford Housing Trust (THT) after writing gay weddings in churches were "an equality too far".
Smith, from Bolton, claimed that Trafford Housing Trust (THT) acted unlawfully in demoting him.
He also alleged that the trust had breached his human rights.
Disciplinary action was launched against Smith after he posted the comment next to a BBC News online story, written in February 2011, with the headline, "Gay church 'marriage' set to get the go-ahead".
In a statement after the hearing at London's High Court he said: "Something has poisoned the atmosphere in Britain, where an honest man like me can be punished for making perfectly polite remarks about the importance of marriage."
At London's high court, judge Justice Briggs ruled in Smith's favour, saying the trust did not have a right to demote Smith as his Facebook postings did not amount to misconduct, and the demotion imposed by way of purported disciplinary sanction constituted a breach of contract.
The judge admitted disquiet about the "very modest" damages due to Smith, limited to £100 for technical reasons.
Briggs, said: "Mr Smith was taken to task for doing nothing wrong, suspended and subjected to a disciplinary procedure which wrongly found him guilty of gross misconduct, and then demoted to a non-managerial post with an eventual 40% reduction in salary.
"The breach of contract which the Trust thereby committed was serious and repudiatory."
The Christian Institute, the group that paid for Mr Smith's legal case, welcomed the ruling.
Spokesman Mike Judge said: "This is a good day for free speech. But would Adrian have won his case if marriage had already been redefined? I don't think so. The Government should stop playing politics with marriage, because it's ordinary people like Adrian who'll get it in the neck."
Matthew Gardiner, chief executive at Trafford Housing Trust, said: "We fully accept the court's decision and I have made a full and sincere apology to Adrian.
"At the time we believed we were taking the appropriate action following discussions with our employment solicitors and taking into account his previous disciplinary record.
"This case has highlighted the challenges that businesses face with the increased use of social media and we have reviewed our documentation and procedures to avoid a similar situation arising in the future. Adrian remains employed by the Trust and I am pleased this matter has now concluded."