Its about 15 minutes by taxi (Around 7km) from the cruise terminal to the Sants train station. Assuming there is no reason the ship is late (it happens) you would probably have no issues. We disembarked from Barcelona as walk offs with our luggage around 8:00am, I think we were at the hotel before 9:00am. Most of that was dragging the bags off the ship, and waiting a few minutes for our turn to get a taxi.