You can follow the indications given in this link.
As you can see, it is quite easy and well connected with Barcelona. The easiest way is to take a High-Speed Train, called AVE or AVANT, which has a large number of travels by day between two cities. It only takes 38 minutes to reach Girona.