The ruling was welcomed by gay activists in Russia who had lodged the case, but Moscow said it would appeal.
The legislation had made “promoting non-traditional sexual relationships” among minors an offence punishable by a fine.
It was also an offence to say that gay relationships were equal to heterosexual ones.
The Strasbourg-based court said the Russian laws “reinforced stigma and prejudice and encouraged homophobia,” which was “incompatible with the values of a democratic society”.
Although homosexuality was decriminalised in Russia in 1993, prejudice is common and human rights activists allege widespread abuse.
Three gay activists — Nikolay Bayev, Aleksey Kiselev and Nikolay Alexeyev — had staged protests outside a school, a children’s library and a government building holding banners that said homosexuality was not a perversion.
They were subsequently fined and appealed against the ruling in Russian courts. But their complaints — right up to the Constitutional Court — were unsuccessful.
The Constitutional Court had said the ban was justified on the grounds of protection of morals and spoke of the potential dangers of “creating a distorted impression of the social equivalence of traditional and non-traditional marital relations”.
Related reading’These laws must be abolished’
The trio then filed applications with the European rights court in 2009 and 2012.
The Strasbourg court said the fines imposed on them breached articles in the European Convention of Human Rights regarding freedom of expression and discrimination.
It bordered Russia to pay 8,000 euros ($8,900) in damages to Bayev, 15,000 euros to Kiselev and 20,000 euros to Alexeyev.
Russia’s justice ministry said it would appeal, and was “preparing legal arguments explaining Russia’s position.”
Russian Foreign Minister Sergei Lavrov reacted to the ruling saying people were not legally pursued because of their sexual orientation, including the LGBT community.
“The only thing that we don’t want, is that someone imposes this orientation on Russian citizens who are minors,” Lavrov told reporters in Moscow.
Alexeyev, who runs the GayRussia website, told AFP: “This is an enormous legal victory for the LGBT in Russia. The ruling is yet one more proof that LGBT activists are discriminated in Russia and their rights are violated.
“These discriminatory laws now must be abolished,” he said in a statement, adding that they had no place “in a free, civilised and democratic and country in the 21st century”.
Under the various Russian laws, if individuals use media or the internet for homosexual “propaganda” they can be fined up to 100,000 rubles ($3,000). Organisations can be fined up to one million rubles and risk being closed down for up to 90 days.
Foreign nationals who use media or the internet for propaganda can be fined up to 100,000 rubles, detained for up to 15 days and deported.
Another law makes “public actions expressing clear disrespect for society and committed to the goal of offending religious feelings of the faithful” punishable with up to a year in jail and fines of up to 300,000 rubles.
The same actions committed in places of worship are punishable by up to three years in prison and a fine of up to 500,000 rubles.
The ruling dismissed Russia’s defence that it was defending traditional values, said a statement from the court.
People had the right to “openly identify themselves as gay, lesbian or any other sexual minority, and to promote their own rights and freedoms,” it said.
The ruling also rejected Moscow’s claims that minors risked being swayed by others into becoming homosexual. Russia had provided no “science-based evidence” to support the claim, said the ruling.
Homosexuality was considered a crime in Russia until 1993 and categorised as a mental illness until 1999.