Tourists who have been to the Tyrrhenian coast repeatedly say: "Forget about Gaeta's public transport, travel on foot and that's it". Because this is the only way to experience the real spirit of the city, its true atmosphere and to get to know the locals.
A worthy alternative to Gaeta's public transport is bicycles that you can rent or scooters that you can also rent. With the spirit of freedom, clear sea, bright sunshine and narrow Italian streets, what could be better?
If you want to know if Gaeta has any transportation at all and what the prices are, it's ok to say that buses are available. Their main advantage is that not many people ride them and they're relatively cheap because they run shorter distances. There are exceptions, of course, which go as far as the Formia train station. A basic tourist tip for transport in Gaeta is to buy your tickets in the small shops that are close to the bus stops.