Rick provides a great deal of detail on the cities he covers, which means problems for breadth-of-coverage in large countries like Spain.
I haven't seen the flower festival, but Enric has spoken highly of it on this forum, and I hope to manage a trip to Catalunya at the right time of year.
Girona is fabulous. Not only is it worth a day-trip, it is worth an overnight stay, even without the festival. There are two historic cathedrals, both of which have English-language audioguides available, as I recall. The medieval district is large, picturesque, with a large section of wall you walk on top of. And there's an excellent medium-sized museum. It's an affluent town with lots of restaurants and a lively atmosphere in the historic area. Highly, highly recommended.
There are two kinds of trains running between Barcelona Sants and Girona. The fast trains theoretically could sell out, but I don't know how likely that would be. You will pay a bit more if you wait to buy the tickets until you arrive in Barcelona. But there are also slower trains (MD and regional), and their fares will not increase as your travel date approaches. Those trains have no reserved seats and cannot sell out. So you'll probably have several options when the time comes. Do check the pricing on round-trip as well as one-way fares. Sometimes in Spain, especially on the regional trains, the round-trip is about the same price as a one-way ticket. Hard to beat that.
My guess--and it is only a guess--is that a lot of the people heading to Girona during the flower festival will be Barcelona residents, and they will mostly travel on a weekend (unless there's a holiday in there somewhere--do check on that!), so you might increase your chances of some elbow-room on the train by making the trip on a weekday.
You can take a look at rail schedules and pricing (for fast trains only) on renfe.com. Use tomorrow's date to see how high the AVE and AVANT fares can be at the last minute. You'll note that the AVANTs are often much less expensive than the AVEs and are just as fast for this trip. As you can see, the MD and regional travel times vary quite a bit. I don't know whether the fares also vary with the speed of the train. I paid under 7 euros one way for one of the slower trains to Girona in July 2016.
When Enric notices this thread, I'm sure he'll provide more information.