Messi struck from the penalty spot to give Barca the lead after he was felled at the end of a weaving run.
Ansu Fati volleyed Barca's second, with Philippe Coutinho adding a third.
Pique's dismissal is a costly one for the Spanish side, with the experienced defender now suspended for their trip to Italian champions Juventus in gameweek two.
Barca coach Ronald Koeman said of Pedri and Fati: "We can be happy with the evolution of the two players. We know how old they are. Pedri always contributes something for his naturalness, for his game, for being smart. We are happy. Not only for that. They have a great future at the club."