City assemblywoman Imma Battaglia said she and mayor Ignazio Marino had decided to send a message with the multi-coloured lights, which ripple for a kilometre and a half (0.9 miles) of the bustling Via del Corso.
Battaglia, who also leads a gay rights campaign group, said the lights were intended to be against homophobia following the suicide of a gay teenager in the city.
"That is how we came up with the rainbow flag idea," said Battaglia, who is from the leftist Sel party, but added that they could also be seen as a peace symbol.
That did not sit well with the opposition in the Italian capital's bassembly, particularly the far-right Fratelli d'Italia (Italian Brothers) party.
"The idea is provocative and ideological. There should be an Italian tri-colour instead," Fabrizio Ghera, an assemblyman from the party, said earlier.
The Italian flag colours were used in 2011 to mark the 150th anniversary of Italian unification, while the lights were white monochrome for Christmas last year.
The head of the company behind the installation, Laura Rossi International, sought to defuse controversy on Friday, saying the lights would now be dedicated to the late anti-apartheid icon Nelson Mandela.
"This way the message of love, tolerance, unity and sharing will become stronger," Rossi said.