Here "gates" refers to the city gates. The phrase "open their gates to you" represents the people surrendering and allowing the Israelites to enter their city. Alternate translation: "let you enter their city peacefully" (See: [[rc://en/ta/man/jit/figs-metonymy]])