1. Gallipoli – Beach of Purity

Located at the tip of the peninsula pointing towards pristine San’t Andrea Island, Gallipoli is practically surrounded by sparkling blue ocean on three sides – its historical centre is on an island detached from the mainland. This little island is packed with impressive historical sites, including the Co-cathedral of Saint Agatha, Torre del Governatore (the “Governor’s Tower”), and Gallipoli Castle. It's also the location of the Beach of Purity.

This little haven is one place that lives up to its name. Backed by the ancient city walls and looking out directly onto San’t Andrea Island's iconic lighthouse, this is about as photogenic a beach setting as you can get. The golden sand and gentle turquoise water make it easy to see how this beach got its name. The Beach of Purity is just a 15-minute walk from Gallipoli railway station.

Getting there – Take a Frecciargento train to Lecce from any Italian city and continue your journey by bus with FrecciaLink. For example, you can get from Bari to Gallipoli in about 2h 38m. On Frecciargento trains you can enjoy free and unlimited WiFi, large leather armchairs, plenty of legroom and space for luggage, a welcome service with drinks and snacks and much more.

2. Taranto – Marina di Ginosa

Taranto is a small city with a big history. Visit the MArTA Archaeological Museum and the Spartan Hypogeum Museum to learn about the town’s ancient origins. The 15th-century Aragonese Castle is the most eye-catching historical relic, perched on the edge of the Ionian Sea in the heart of Taranto's historic harbour. However, we're here for the beaches – and there's plenty to choose from.

The long, wild beach of San Pietro in Bevagna, fringed by sand dunes and natural vegetation, is in the Province of Taranto. So is Torre Colimena beach, at the beginning of a Regional Nature Reserve that's home to several species of flamingos. Our pick for the best beach to visit in the area, though, is Marina di Ginosa. This gorgeous beach stretches on for several uninterrupted kilometres. It has a shallow seabed, so it's perfectly safe for swimming, and ideal for families with children.

Getting there – Take the 26-minute regional Trenitalia service from Taranto to Ginosa station, just a 5-minute walk from Marina di Ginosa beach.

3. Ostuni – Torre Pozzelle

Ostuni is one of Puglia's most attractive cities. It's known as the "White City" because of its distinctive whitewashed houses, which line its winding medieval streets towards a striking cathedral tower. But in addition to being a gorgeous Italian hilltop town, it's also a stone's throw from some of Puglia's most pristine and unspoilt beaches.

Located between the Torre Canne and Torre San Leonardo lighthouses, the expansive Coastal Dune Regional Natural Park features wetlands, wildlife, beachfront dunes, and ancient olive groves. A bit further along the coast in the other direction is our pick of the bunch. Torre Pozzelle is a beautifully secluded bay area with a golden sand beach and clear water. It's enclosed by cliffs, distinctive rock formations, trees, and its most striking feature, the crumbling 16th-century tower of the same name looking out over the water.

Getting there – Trenitalia operate on average 19 trains a day from Lecce to Ostuni, taking as little as 41 minutes. Ostuni railway station is located between the town centre and the coast. In summer, there are direct bus services from the station to Rosa Marina, on the edge of the Coastal Dune Regional Natural Park.

4. Lecce – Mora Mora Beach

Lecce, also known as “Florence of the South”, is packed with beautiful buildings. Don't miss the magnificent Basilica di Santa Croce and its impressive rose window. The nearby Lecce Cathedral, in Piazza del Duomo, has an imposing bell tower and double facade. Also in the town centre, around Piazza Sant'Oronzo, you'll see the 2nd-century Roman column and sunken Roman ampitheatre. The nearby Castle of Carlo V, dating from 1539, is an equally impressive site.

As beautiful as Lecce is, though, it would be a shame not to suggest leaving town for the coast. Lecce is only a short hop from beautiful Mora Mora Beach. Backed by wild shrubbery and looking out onto a gently rolling Adriatic Sea, Mora Mora's pearl-white beach has a semi-rural vibe. It's one of the most tranquil and secluded beaches in Puglia – or at least it feels like it. But actually it's easy to reach by public transport.

Getting there – Take the Frecciargento train from Bari to Lecce (1h 20m), then hop on the regular bus 101 and stop at Viale Europa, just a 2-minute walk from Mora Mora Beach.

5. Polignano a Mare

Polignano a Mare is located on the southern Adriatic coast, in the province of Bari. This stunning coastal town is built on top of sharp, craggy rocks jutting into the Adriatic Sea. Its breathtaking cliffside is famous for hosting the Italian segment of the Cliff Diving World Series. And it's one of the best beaches in Puglia for Instagramming. It's not only dramatic cliff drops, though. Polignano's Lama Monachile and Ponte dei Lapilli beaches are great for families, offering gentle swimming and sunbathing in a remarkable location. Better yet, they're only a short walk from Polignano a Mare train station.

Getting there – There are 21 trains a day from Bari to Polignano a Mare, taking about half an hour.

Tempted to plan a beach holiday in Puglia? We're not surprised. Remember, this is only a selection of the best beaches in Puglia to reach by train. You can find a lot more information, and travel options, by having a look around our dedicated Trains in Italy and Trains in Puglia pages.