Galliani said that he was particularly impressed by the Milan defence preventing the Spaniards from working the ball into the box.
"We did very well and I have to say that our coach was very, very good," Milan's official website quotes him as saying. "We played a perfect match.
"We did well to prevent Barcelona from getting inside the box and I don't want to single out any particular player as they all did well.
"Football is beautiful as you never know what can happen, but not even the most optimistic fan would have imagined this."
The return leg takes place on Tuesday, March 12.