A judge also awarded Steve Loha damages after he was forced to close his watch and mobile phone stall in Chichester market immediately, following a single complaint.
The businessman, who was supported in his case by the Christian Legal Centre, said he was "absolutely pleased, delighted that we had a victory", adding "of course, it's all praise to God".
Mr Loha's permit to operate on the market was pulled in May 2017 after one customer - a Chichester District Council member of staff - complained about religious material.
Mr Loha, who had spent 15 years running his stall two days per-week on the market, said he was later told by managers of the market that the tract was "extremely homophobic and unacceptable".
The material was defended by his legal team who said it is "undoubtedly stark" in challenging homosexuality and "not particularly comfortable to read" but "the fundamental message of the tract is true".
Andrea Williams, chief executive of the Christian Legal Centre, commented: "This decision makes a welcome change from a worrying trend we have seen in many recent judgments which sought to justify removal of Christians from their jobs and livelihoods for purely ideological reasons.
"In this case, however, the judge had the courage to uphold the rule of law."
Video: Christian Legal Cente
A judge highlighted how, under criminal law, "hostility based on sexual orientation" is "an aggravating factor when considering the seriousness" of a criminal offence, but "not an offence in its own right".
He asked rhetorically: "If the homophobic element is parasitic on a criminal offence, what is that offence?"
The judge also ruled that an accusation of homophobia did not enable the market operator to evict a trader straightaway, without giving a reasonable notice or hearing his side of the story.
It is understand legal representatives for the managers of Chichester market, Bray Associates, are seeking permission to appeal against the ruling.
Premier has contacted Bray Associates for a comment.
Stay up to date with the latest news stories from a Christian perspective. Sign up to our daily newsletter and receive more stories like this straight to your inbox every morning.