You're going to have to open those gates yourself.
Of course, you'll need to get inside the city first.
That means you have to get the password to get inside.