The gang was seen damaging property and shouting abuse in video footage posted on YouTube.
Police said one worshipper sustained minor facial injuries when he tried to prevent the group entering the building.
“The incident is being treated as an anti-Semitic incident, due to remarks made by one of the group,” London’s Metropolitan police said in a statement.
“However, there is nothing to suggest it was a planned or targeted attack.”
Police said the men involved were drunk, and they were believed to have walked to the area from a house party nearby.
They said they would step up patrols to provide reassurance to the local community.
Stamford Hill is home to one of the largest Orthodox Jewish communities in Europe, with about 30,000 Hasidic Jews living in the area.