Mr Williamson was suspended in February after The Yorkshire Post revealed he had claimed Labour had been "too apologetic" in response to criticism of its handling of anti-Semitism allegations.
He was readmitted to the party and issued with a formal warning following a hearing of a National Executive Committee (NEC) anti-Semitism panel in June - prompting an outcry from MPs, peers and Jewish groups.
But he was suspended again in July after a second panel reviewed the decision to reinstate him and found it "cannot safely stand".
Labour also imposed a separate suspension on September 3 over additional allegations of misconduct.
At a hearing in September, Mr Williamson's lawyers argued that his treatment had been "manifestly unfair" and asked the High Court to declare his suspension from the party was void.
Giving judgment today, Mr Justice Pepperall ruled that "the Labour Party acted unfairly in that there was no proper reason for reopening the case against Mr Williamson".
However, the judge found that there was "nothing in the new allegations, the timing of the letter of 3 September or the decision to suspend that entitles me to take the view upon the papers that the Labour Party is acting either unfairly or other than in good faith".
He added: "I therefore refuse relief in respect of Mr Williamson's recent re-suspension. The new disciplinary case must run its course."
Mr Williamson said in a tweet after the ruling: "The battle is won. The war rages on.
"The High Court has today judged that the Labour Party acted unlawfully in re-suspending me on 28 June, and 'that there was no proper reason' for doing so.
"I'm glad the 're-suspension' has been quashed. However, I'm currently suspended."