There is a hotel in-campus that is very good and close to the ICE (15/20 min walking distance). Price / quality is very good. Follow this link
Downside is that you might want to go for dinner at the city and last train back is 23.50 (if you want to feel like cinderella)
We suggest coming to ICE by the S2 line (green) of the FGC train. Therefore any hotel along that line would work, very particularly close to FGC Gràcia Station (cool neighborhood), but also FGC Provença or FGC Sant Gervasi. For example,
The FGC S2 line departs from Plaça Catalunya, that is another option for hotel locations.
Residencia de Investigadores
CSIC has a network of residences for researchers spread across town. The one at Carrer Hospital 64 is close to La Rambla and Plaza Catalunya. This is not a hotel per-se but typically offer a good quality/price ratio (tends to be booked!). Check
Other Residencias might also be available, not too far from Plaça Catalunya,
Residencia Campus del Mar
Residencia La Ciutadella
Otherwise, you will not be short of options in Barcelona.