There has been some debate at both the totalwar.com forum and the totalwar.org forum about whether a gun factory exists in the game. I have actually built one myself and I'm posting some information here to show that it does exist.
The following picture shows the province with the gun factory.
The following picture shows the description of the gun factory.
This zip file contains a saved game in which I built a gun factory. It was built in Aki. However note that my version of STW is an English version for distribution in South East Asia. I hope it is compatible with whatever version you are using. Just unzip the file into your C:\Program Files\totalwar\savegames directory (or something like that) and you should be able to load the campaign game "GunFactory".