Footage posted on social media showed the men, all in white T-shirts, violently attacking people on platforms and inside train carriages. At least 36 people were injured in the violence, local media report.
The mob attack followed the latest pro-democracy rally in the centre of Hong Kong, where riot police had fired tear gas and rubber bullets at protesters.
In a statement, the government said that in Yuen Long “some people congregated at the platforms of the MTR station and train compartments, attacking commuters”.
“This is absolutely unacceptable to Hong Kong as a society that observes the rule of law. The SAR [Special Administrative Region] Government strongly condemns any violence and will seriously take enforcement actions.”
Hong Kong Police also said: “Some people attacked commuters at the platforms of the Yuen Long MTR station and train compartments, resulting in multiple injuries.”