You will be off the ship at 9/9.30 latest. You store your luggage at Barcelona Sants train station - it is about €4 for a large locker that takes 2 suitcases. Its is €30 for a taxi from town to the airport.
They will boot you off the ship as soon as possible - the ship is nearly always cleared by 10am. Why not fly out to Barcelona the day before and stop in hotel.