The court in Saint Petersburg on Wednesday announced the decision against the groups on VK, a Russian platform similar to Facebook.
"An inspection showed they contain information available to the public, including children, which negates family values, propagates non-traditional sexual relations and promotes disrespectful attitudes towards parents," the court statement said.
Russia in 2013 introduced a law against "gay propaganda", which officially bans the "promotion of non-traditional lifestyles to minors" but in effect outlaws LGBT activism.
One of the groups mentioned in the court decision is called the Russian LGBT Community, which has more than 187,000 members.
The other group, LGBT Russia, is overseen by the NGO Russian LGBT Network, which told AFP the decision was a complete surprise.
"The court spends about five minutes blocking LGBT internet resources and the decisions have identical wording," said the organisation's spokeswoman, Svetlana Zakharova.
"We don't publish anything on our pages that needs to be marked 'adults only'," Zakharova said. "We talk about cases of discrimination and human rights violations and help anybody who needs it, including teenagers," she said.
Zakharova said the NGO would appeal the ruling.
Homophobia is widespread in Russia where reports of rights violations and attacks on LGBT people are common, though there are gay scenes in major cities.