Nowadays, people also talk about gates at airports. When going on an aircraft, people need to get together in a certain area of the airport first. They then pass through some kind of doorway to get onto the plane. That is what is called gate.
Gates to official residences often feature elaborate ironwork.