Owners of four apartments in the Neo Bankside apartment complex sought to force the gallery to block off part of the 10th-floor terrace, which offers 360-degree views over London.
A lawyer for the homeowners argued the platform, used by up to 1 million people a year, constituted a “relentless” invasion of residents’ privacy.
The gallery’s board said residents could solve the problem by drawing their blinds or putting up curtains.
On Tuesday, High Court judge Anthony Mann dismissed the residents’ claim on both privacy and nuisance grounds.
He denied the homeowners permission to appeal, although they can seek to challenge that ruling.