The senior judge ruled it was "irrational" of councillors to grant consent against the "overwhelming" advice of the planning officer on the proposed redevelopment of a skittle alley attached to the Belvoir Castle pub, Lower Bristol Road, thought to be at least 150 years old.
Rengen Developments Limited had applied to build a new community room, accessible toilets and nine studio apartments on the site.
In his report to Bath and North East Somerset Council, the officer recommended that planning permission be refused, pointing to "multiple and significant conflicts" with the local development plan, and concluded that the benefits of the scheme did not outweigh the harm it would cause.
However the council's development management committee rejected the report's recommendation in April by a majority of five to four last year, and granted permission.
Susan Walker, resident of a listed terrace adjoining the pub, subsequently mounted a judicial review challenge to the decision.
This led to the council admitting that its decision was unlawful in a draft consent order. However, the developer continued to try to save its permission by launching challenging the draft order in the High Court.
Ruling on the case, Mrs Justice Jefford noted that the pub is located within a conservation area and a world heritage site.
Conservation bodies the Bath Heritage Watchdog and the Bath Preservation Trust had both strongly objected to the proposals, and the council's own environmental and design team had also recommended that consent be refused.
Fourteen public objections were made to the proposals, although there were also two in support, with one describing the skittle alley as a "total eyesore".
A petition bearing 71 signatures in favour of the development, which argued that it would improve the pub's facilities and help to secure its future, was also submitted to the council, the court heard.
In his report to the committee, however, the officer said there was no "intrinsic link" between redeveloping the site and the long-term success of the pub, and that improving its facilities, whilst potentially increasing interest in the pub, would not "guarantee that it would continue to run in the future".
The officer pointed out that the flood risk posed by the development had not been assessed and, overall, his report was "overwhelmingly" in favour of refusal.
Overturning the permission, the judge ruled that, given its stark disagreement with the planning officer, the committee was obliged to give reasons for its decision.
After weighing up the advantages and disadvantages of the scheme, the officer had "identified an accumulation of reasons" why planning permission should be refused.
But the judge said the minutes of the committee meeting "neither give reasons for the committee's decision on the main points of difference nor given any indication as to why it reached a different overall conclusion".
She added: "So far as the heritage aspects are concerned, the impact was not merely on a listed building but one in a conservation area and in a world heritage site.
"Numerous concerns were expressed by the heritage organisations, members of the public and councillors about the impact on Park View and the amenity of its residents."
The judge added that those who signed the petition "were assuming a link between the development and the future of the pub" but gave no indication of why they supported the studio flats development.
The minutes of the meeting also gave no indication that councillors had addressed the flood risk issue identified in the officer's report.
Declaring the committee's decision irrational, the judge said that factors in favour of the development were "very largely a matter of assertion, and assertion that was demonstrably wrong or questionable".
Those factors, she concluded, "could not rationally have outweighed the multiple departures from the development plan that the officer identified".
The planning permission was quashed.