Unlike other buildings, Gates require an extra resource, cannons.
If you cannot upgrade even if you have enough food/wood/iron/silver,
scroll down to check cannon number at the bottom of the upgrade pop up.
※ If you research a high tier ship in the Ship section at the Royal Academy,
you can create the needed cannons at the Cannon Factory.