The word "gates" here is a metonym for the towns inside the gates. Alternate translation: "lives in your towns" (See: [[rc://en/ta/man/jit/figs-metonymy]])
Yahweh choosing the people of Israel to belong to him in a special way is spoken of as if Yahweh set them apart from all other nations. This can be stated in active form. Alternate translation: "For Yahweh your God has set you apart from other nations" (See: [[rc://en/ta/man/jit/figs-metaphor]] and [[rc://en/ta/man/jit/figs-activepassive]])