Zlatan Ibrahimovic's 20th minute strike cancelled out an early own goal from Mark van Bommel, but Messi restored his side's lead at the half-hour mark with a converted spot kick. Goals from Kevin-Prince Boateng and Xavi eventually resulted in a final score of 3-2 for the Catalans.
"It was crucial to win tonight as it makes the draw for the round of 16 slightly easier, in theory, which is better for us," Messi was quoted as saying on the official Uefa website.
"We badly wanted to win against this great team and I think it was a great spectacle for the fans in a fantastic stadium. It was a great match against a prestigious team. We finished top which was what we were looking for."
The Argentine then reflected on his first successful strike against an Italian team, but stressed that it was all about the three points rather than individual glory.
"It was nice to score my first goal against an Italian team but the important thing was to win and we did that against a side with excellent players."
Starting last week and continuing every Friday through to January, Goal.com will publish extracts from Graham Hunter's highly-anticipated book, Barca: The Making of the Greatest Team in the World. This Friday, tune in for a new enthralling extract on how Joan Laporta and Sandro Rosell used David Beckham as a vote-winner in the club elections of 2003, even though a deal was already done between Manchester United and Real Madrid. Don't miss it!