The Strasbourg judges said Russia had discriminated against three gay rights activists who opposed the law. It was adopted in 2013, banning promotion of homosexuality among people under 18.
The law "reinforced stigma and prejudice and encouraged homophobia", the ruling said.
Gay rights groups condemned the law.
Under the law, private individuals deemed to be promoting "homosexual behaviour among minors" face fines of up to 5,000 roubles (£67; $85), while officials risk paying 10 times that amount. Businesses and schools can be fined up to 500,000 roubles.
Homosexuality was decriminalised in Russia in 1993, but anti-gay prejudice is rife.
Critics see the propaganda law as part of a state campaign to marginalise LGBT activists, whose work includes dissemination of sexual health advice.
The Strasbourg court said the fines imposed on three Russian gay rights activists violated Article 10 (freedom of expression) and Article 14 (prohibition of discrimination) of the European Convention on Human Rights.
According to the court, the legislation aimed at curbing promotion of homosexuality was "not clearly defined" and was implemented in an arbitrary way. It "served no legitimate public interest", the court said.
Russia's justice ministry says it will appeal, arguing that the law is aimed "exclusively at protecting the morals and health of children".