Heh, sometimes the gate just gets stuck somehow, possibly from one man getting caught in an unmoveable position. For example in the current Ghazette Challenge siege Gaza on the first turn, and when they sally their gate will be stuck in the open position until you rout a unit through it, even if you sneak behind them and into the city. It's a bug, but it seems to be fairly rare.