The Age of Empires II definitive edition gives you the feature to rotate the gates. This guide will let you know how you can rotate the gates in AOE 2.
You will first need to select the gate and then change its direction by Holding CTRL, and scroll your mouse wheel.
Same in editor mode, either you place one of the four preset directed city gates.
Or you can hold CTRL and scroll your mouse wheel to rotate the gate manually.
Optional: You can change the rotate button via hotkey options.
You have to select the hotkey, click “change selected,” and press your preferred key.
Finally, you will need to press the Confirm button.