A gunboat is a original unit from the game, The Conquerors. It is used to attack other units.
When in the beginning of the game with water in the map, it can be used to attack rival teams to sabotage them from attacking or conquering places. Mostly in the mid-term games in maps with water, it is used sometimes if a person is low on money if they can't afford a greater unit. It also could still be used for sabotaging a rival team.
Since a gunboat is weak even in a group of it, it should mostly be used to sabotage rival teams when they are distracted with battleships and aircraft carriers too if you want to sabotage it quick enough to not be caught.