The court sentence forces city hall authorities to hang a portrait of King Felipe VI in a “preferential and honourable spot in the council chamber”.
The judge's ruling counteracts Barcelona's mayor Ada Colau's decision to remove a portrait and a bust of King Felipe's father and predecessor on the throne, King Juan Carlos.
The regal removal took place in July 2015, just months after Colau had been elected as mayor of the Catalan capital, only for the Spanish government's delegation in the region to present the matter before a judge soon after.
Colau justified the move at the time by calling the presence of the bust in particular an “anomaly”, given King Juan Carlos's abdication in June 2014.
She did not however allow for the new Head of State, King Felipe, to be depicted in painting or sculpture at Barcelona City Hall.
According to Spanish broadcaster Cuatro, the judge ruled that “the placement of symbols in the council chamber is obligatory according to municipal regulations”.
The ruling is the latest chapter in a spat between Barcelona's republican mayor and Spain's monarchic establishment.
In late February, senior Catalan officials including Colau refused to attend King Felipe's first royal reception in the region since October's independence crisis, claiming the monarch had supported police brutality and political repression during the unofficial independence referendum.
The Spanish king's visit was also marred by street protests and anti-monarchic slogans from republican groups in the region.