Here "enslaved" is a metaphor being unable to stop one's self from doing something. This can be stated in active form. AT: "the elemental principles of the world controlled us" or "we had to obey the elemental principles of the world as if we were slaves" (See: [[rc://en/ta/man/translate/figs-metaphor]] and [[rc://en/ta/man/translate/figs-activepassive]])
Possible meanings are 1) this refers to the laws or moral principles of the world, or 2) this refers to spiritual powers, which some people thought control what happens on earth.
Paul uses the metaphor of a person buying back lost property or buying the freedom of a slave as a picture of Jesus paying for his people's sins by dying on the cross. (See: [[rc://en/ta/man/translate/figs-metaphor]])