Milan were beaten 4-0 and went out 4-2 on aggregate.
"Tonight Barcelona were extraordinary, especially in the first 30 minutes. Despite all that pressure, they had few real chances.
"In the first half we had a lot of problems emerging from our half, as they were pressing us and forcing errors," said Allegri.
"Of course qualification was always going to be a matter of centimetres. We hit the upright with Niang, then conceded with Messi.
"This defeat is disappointing for the club, the fans and the lads, as they gave their all and hoped to achieve something remarkable. Tonight it was tough against this Barcelona, yet we kept it open to the end and when 3-0 down had some chances that could've gone better.
"This team needs to grow and had five players who were in their first Champions league campaign. It will be useful experience."