It can be used for both literal gates (like a gate in a fence) and figurative gates (like "the gate to success").