Costa Brava is not recommended as a day trip from Barcelona
Costa Brava is best explored over at least two days with one of the towns of Costa Brava acting as your base station. If you insist on exploring Costa Brava as a day trip from Barcelona, be prepared for a long day and plan to drive; public transport is inconvenient to see this area in a day. Starting from Palamos, work your way up to Begur - Sa Tuna in the north, before returning to Barcelona late in the evening. Your drive will also take you to Calella de Palafrugell, Llafranc, and Tamariu.
Calella de Palafrugell - Llafranc
These adjacent towns are easily within walking distance of each other along a cliffside walk, one of the most beautiful stretches along the Costa Brava. In Calella de Palafrugell you can enjoy a meal with a view of the wooden boats at Las Vueltas promenade on Port Bo beach. In Llafranc for a relaxed time and to see the town that was a favourite of artists (like Dali), and of film stars.
Begur - Sa Tuna
Girona instead all of Costa Brava
If you can only spare time for a day trip from Barcelona, it is better to restrict to Girona. Girona is ideal as a day trip from Barcelona. Or consider the famous Dali triangle tour of you are interested in art.