Luis Suarez scored one and created two goals as Barcelona temporarily, at least, cut the gap to La Liga leaders Real Madrid with victory at Granada.
Rakitic put Barcelona two-up before Rico Castro levelled matters via the penalty spot. Suarez and Messi then both found the net to give the visitors a fairly comfortable 1-3 victory.
Real Madrid face Villarreal on Sunday.