The people followed the dictator like sheep.

Literal

People [topic-は] just-like sheep [simile-のように] dictator's behind [at-に] followed.

まるで...のように is the emphatic simile construction — 'exactly as if...' まるで reinforces the ように clause. 後に従う ('to follow behind') is a set expression where 後 takes に marking the location of the following. The image is a political cliché for blind obedience.