Gaeta has no train station of its own. The nearest station is Formia–Gaeta, about 8 km away in Formia, on the main Rome–Naples coastal line. Trains from Rome Termini take about 90 minutes; from Naples Centrale, about 70 minutes. Regional trains are frequent and cheap. From the station, local buses (line 2) and taxis connect to Gaeta in around 10–15 minutes.
By car, Gaeta is reached from the A1 (Autostrada del Sole) via the Cassino or Caianello exits, then the SS7 Appia along the coast. From Rome the drive is around 130 km (about 1 hour 40 minutes, longer in summer traffic); from Naples around 90 km (about 1 hour 15 minutes).
By bus, Cotral runs services between Rome (Anagnina and Tiburtina stations) and the Gaeta/Formia area, with journey times of around 2–2.5 hours. These are slower than the train but useful if you are coming from parts of Rome not well connected to Termini.
The nearest airports with useful connections are Rome Fiumicino (Leonardo da Vinci) and Rome Ciampino, both roughly 130 km north.