The Argentine equals Pele as the player with most goals scored for a single team as the Brazilian has got the same number of goals for Santos.
It took Messi two attempts to score past the Che; first, his penalty kick was saved by Jaume Domenech but he sent the ball in with his head after a cross from Jordi Alba.
Leo's next goal for Barca will set a new world record.