Milan gave themselves a great opportunity to oust the pre-competition favourites after surprising them 2-0 in last month's last 16, first leg at the San Siro.
However, Lionel Messi and his inspired team mates crushed the Italians 4-0 in the return game to progress to the last eight 4-2 on aggregate and keep alive their dream of a third European crown in five years.
Milan could have progressed with an away goal at a tense Nou Camp until the 92nd minute when Jordi Alba struck to kill them off and they had almost levelled at 1-1 on the night when M'Baye Niang struck a post moments before Messi's second.
"For a matter of a few centimetres, maybe if Niang had scored, we would be here talking about a different game," Allegri told a news conference.
"After we went 3-0 down we still tried to pressure them and we managed to create chances," he added.
"But when you are playing Barcelona and you have around five or seven opportunities to score you have to take them.
"Milan tonight played a worse match than the first leg and in the first half an hour they did not let us play."
After their failed bid for an eighth European crown, Milan, who are third in Serie A, must now focus on getting back into Europe's elite club competition again next season.
There are many positives for Allegri and his young side, not least their fine first-leg performance when Barca were unable to penetrate a well-organised defences and Messi was well shackled.
It was a different story in Tuesday's second leg when Messi's fifth-minute opener set the tone for the night and Barcelona were back to their dominant best.
"When you see (Andres) Iniesta dribbling the ball effortlessly in the 90th minute you can understand a lot of things," Allegri said.
"We were very good in the first leg but Barca's potential did not change," he added.
"They are the strongest team in the world and they have three extraordinary players in Messi, Xavi and Iniesta."
- Sports & Recreation
- Lionel Messi