Madonna called the St Petersburg law a "ridiculous atrocity" before her concert there last August.
"I will come to St Petersburg to speak up for the gay community and to give strength and inspiration to anyone who is or feels oppressed," the singer had said last March 20 by email.
Madonna did perform and was sued for 333m rubles (¤8.2m) less than two weeks later by nine local residents who accused her of "violating cultural traditions and promoting homosexuality". She won the case in November.
The legislation is already in force in 12 of the country's 83 regions.
"This law reminds us of the Stalin and fascist era, when groups of people were called socially unequal," said Igor Kochetkov, head of the Russian LGBT Net movement from St Petersburg before the vote. Homosexuality was illegal in the Soviet Union and decriminalised in Russia in 1993.
Putin, who faced unprecedented protests last year, has campaigned with "traditional values" before a March election returned him the presidency.
The Duma vote took place after the Russian leader's approval rating fell to the lowest since 2000.
Some 62pc of Russians approve of Putin's performance, the lowest since June 2000.
That's down from 72pc two years ago, according to a poll.