I think this is fixed now. Enemies outside the gate will constantly try to move towards the gate, or further inside the city if possible.
Seems to be fixed. I did a quick test game; built City Walls and then just waited. After a while, I got attacked by raider cavalry. After moving units to make room inside the city, the raider cavalry moved through the gate.