The comfortable victory put the Catalans 14 points clear at the top of the table and was full of positives ahead of Tuesday's Champions League last-16 return match against AC Milan when they must overturn a 2-0 deficit from last month's first leg at the San Siro.
Messi came off the bench with about half an hour left and netted a stunning goal, his 40th in La Liga this season, while a resurgent Alexis Sanchez scored the opener and provided the assist for the World Player of the Year's brilliant late strike.
Barca also kept a clean sheet for the first time in 14 outings and a repeat performance is needed against Milan.
Spain midfielders Sergio Busquets and Andres Iniesta will be fresh after only playing 15 and 25 minutes respectively while centre back Gerard Pique, full back Jordi Alba and forward Pedro, who are likely to start against the Italians, did not feature at all.
Alexis has struggled for confidence this term but his zippy performance against Depor may have been enough to win a starting spot against Milan in a three-pronged attack with Messi and Pedro.
"I am pleased I played and managed to score a goal," he told Spanish television. "We have a battle on Tuesday that we must win at all cost."
Failure for Barca, who were dumped out of the King's Cup by arch-rivals Real Madrid this month, will mean La Liga is their only chance of silverware this season.
Sporting director Andoni Zubizarreta sought to dampen any over-exuberance following Saturday's victory.
"I don't think this was the prologue for Tuesday's game," he said. "Champions League matches are always special and we are well aware of the result we need to get through," added the former Barca and Spain goalkeeper.
One negative from the game with Depor was the continued poor form of Spain forward David Villa who has yet to get back to his best after breaking his leg at the end of 2011.
He had a golden chance midway through the first half but inexplicably dithered before shooting and Depor keeper Daniel Aranzubia was able to smother his weak effort.
- Sports & Recreation
- Champions League
- AC Milan