So imagine you are playing in your backyard and you have a fence around it. That fence keeps you safe and lets you control who comes in and out of your backyard to play with you. A city gate works the same way, but it's a big fancy fence around a whole city, with giant doors that can open and close. It keeps the people in the city safe by not letting just anyone come in. When someone wants to come into the city, they have to go through the gate and show that they are allowed to come in. It's like a big bouncer for the city!