Spain travel guide
Barcelona works as a short city-and-coast break. For a longer first visit, consider a Catalan day trip or a second city by rail.

With 3–4 full days
Keep the Gaudí bookings, old town and Montjuïc on separate days. Add a dedicated Gràcia and Park Güell day if the timetable allows.
With 6–8 full days
Pick Girona as a low-friction day trip or move to Madrid for a few nights. Check that your rail ticket departs from the station you planned for.