UEFA Champions League: Barcelona 2 Man City 1
Messi's 28th goal of the season put Barca in front at Camp Nou, but Vincent Kompany looked to have denied the Spanish champions victory on the night when he equalised a minute from time.
Messi and Alves had scored in a 2-0 first-leg victory at the Etihad Stadium and Brazil full-back Alves popped up again with a late goal to seal the victory for the Spanish giants in time added on, as Barca progressed 4-1 on aggregate.
It could even have been more comfortable, as Messi was unfortunate not to be awarded a first-half penalty following a challenge from Joleon Lescott and then struck a post in the second half.
Neymar had a goal wrongly disallowed for offside as Barca coasted into the last eight to ease the pressure on coach Gerardo Martino, who was given a vote of confidence this week after Saturday's 1-0 defeat against Real Valladolid.
City had Pablo Zabaleta sent off for a second bookable offence after he showed dissent 12 minutes from time after referee Stephane Lannoy had somehow failed to award a penalty when Edin Dzeko was brought down by Gerard Pique, as they crashed out of the competition three days after losing to Wigan Athletic in the FA Cup quarter-final.
Martino made two changes to the Barca side beaten by Valladolid on Saturday, with Jordi Alba and Andres Iniesta replacing Adriano and Pedro.
Lescott, Yaya Toure, Samir Nasri and Sergio Aguero were the only City players to retain their starting places following Sunday's shock FA Cup defeat.
City were aggrieved with a penalty awarded to Messi in the first leg, but they got lucky when the Argentina forward appeared to be caught by Lescott just eight minutes in and referee Lannoy saw nothing untoward.
The Premier League side were fortunate once again 17 minutes in, when Neymar had the ball in the back of the net, but marauding full-back Alba was adjudged to be offside, despite appearing to have timed his run to perfection.
The Brazil forward then fired into the side-netting before Joe Hart denied Xavi and Nasri spurned City's best chance of the first half when he shot straight at Victor Valdes from inside the penalty area after a fine move.
City were indebted to Fernandinho a minute before the break when he headed Neymar's shot off the line to ensure that the first half ended goalless.
Aguero was withdrawn at the break due to a hamstring injury and his replacement, Dzeko, took just a minute to test Valdes with a right-foot strike.
Lescott breathed a sigh of relief when he gave the ball away and Messi ended a trademark run with a measured left-foot shot that struck the post five minutes after the break.
City needed a minor miracle, but they looked far more threatening in the opening stages of the second half - Valdes producing an outstanding reflex save to keep out a Dzeko header that looked destined for the top corner of the net.
Zabaleta then sliced a left-footed shot just wide.
Messi finally eased Barca's nerves after 66 minutes though, coolly finishing with the outside of his left foot after Lescott had clumsily failed to deal with Cesc Fabregas' attempted throughball.
City ought to have had a spot-kick 12 minutes from time when Pique brought down Dzeko, but the French official waved play on and then sent off Zabaleta for his protests.
Kompany did give them something to shout about when he turned in from close range a minute from time.
But Alves had the final say, as he calmly slotted home a minute into stoppage time after good work from Iniesta to set the seal on the victory.