巻く means "wind up", "bind"
巻かれる is the passive "be wound up in", "be bound [by]"
巻かれろ is the brusque imperative of the passive, so it's a forceful instruction, the kind the speaker does not expect to be ignored: "be wound up [in]!", "[let yourself] be bound [by]!"
So the whole means "When it comes to something long, [let yourself] be bound!" That is "When you're dealing with something that's too long for you to handle, you just have to give in and let yourself be wound up in it". In other words "If you're dealing with people/circumstances more powerful than you are,the only thing to do is succumb/fall in with their wishes/go over to their side".
There is the Biblical expression "It is hard to kick against the pricks" (the image is of an ass lashing out with its hind legs against the pricking of its master's goad - a futile thing for it to do), but this may sound rather quaint. A more modern expression would be (I think - I speak as a Brit and am open to correction by native-speakers of US English) "You can't buck the odds"