expression
in crowds; in a group; in swarms
Describes people, animals, or things gathering or moving in large numbers. Often used with verbs of movement or gathering.
See also: なして
観光客が群をなして寺に向かった。
Tourists headed to the temple in crowds.
ハチが群をなして飛んでいる。
Bees are flying in swarms.
群がる is a verb meaning 'to swarm' or 'to crowd around', while 群をなして is an adverbial phrase describing the manner of gathering or moving.
From 群 (ぐん, 'group') + を + なして, the -te form of なす (成す, 'to form'). Literally 'forming a group'.