Ernesto Valverde saw his team hit the front after 18 minutes against his former employers when Dimitris Nikolaou put through his own net and a straightforward outing in teeming rain at Camp Nou seemed on the cards.
But Olympiacos were given a route back into the contest when Pique, already booked, turned in a saved shot from Gerard Deulofeu with his hand and referee Willie Collum was in no doubt the Spain centre-back had to go.
The sound of opportunity knocking did not draw Panagiotis Lemonis' men from their shells and Messi joined his great rival Cristiano Ronaldo as the second member of an exclusive club by winning and converting a free-kick after the hour.
Lucas Digne made sure of Barca preserving their 100 per cent record in this season's competition, while Nikolaou concluding an eventful 90 minutes by powering in a header at the same end where he erred earlier was scant consolation to Olympiacos, who are pointless after three matches.
Barcelona were playing at home for the first time since facing Las Palmas behind closed doors in LaLiga on the day of the Catalan independence referendum earlier this month and some supporters waved "Si" banners in support of the separatist movement
The match soon settled into a pattern of attack versus defence and Luis Suarez almost gave the hosts a fifth minute lead, sliding in at the back post when Samuel Umtiti glanced on Deulofeu's right-wing corner.
Deulofeu performed brightly in the opening exchanges and he crafted the breakthrough goal when the unfortunate Nikolaou diverted the ex-Everton forward's low cross into his own net.
Paulinho was making his first Champions League start for the club and almost doubled Barca's advantage in the 24th minute when Andres Iniesta's floated pass prompted Olympiacos goalkeeper Silvio Proto to charge into no-man's land.
The Brazil midfielder could only direct his header against the crossbar and Proto soon displayed his capabilities in a more pleasing light by thwarting Suarez one-on-one before parrying away to his right when Messi darted in field on to his lethal left foot.
A routine half carried a sting in the tail for Barcelona, however, when Pique was given his marching orders for scoring with his hand, having received an earlier caution for a cynical foul on Vadis Odjidja-Ofoe.
Valverde sacrificed Deulofeu to send on Javier Mascherano as Umtiti's new partner at centre-back but LaLiga's leaders remained on the front foot.
Suarez's skewed his volley in the 50th minute after Digne got to the byline, with the Greek champions very much wedded to their earlier approach.
Nikolaou's night took another wrong turn as he had a hand in Barca's second by scything through Messi on the edge of the area. Proto was powerless to prevent the Argentinian maestro from making history and could only push a curling strike into the roof of the net.
It was soon three in the 64th minute as the Blaugrana attack swarmed the Olympiacos box and the ball broke for Digne to lash a low shot into the bottom right corner.
The overworked Proto scampered from his line to smother Messi's latest menacing run, while a ragged outing for Suarez in front of goal prevented an event more humbling experience for the meek visitors.
They at least had the final word as Nikolaou rose to meet a right-wing corner from substitute Konstantinos Fortounis and end his personal ordeal on a positive note.
KEY OPTA STATS
- Messi has scored five free-kick goals in 2017, equalling his highest figure in a calendar year (2012).
- Messi scored and assisted in a single Champions League match for the first time in almost a year. The last time was against Manchester City on October 19 2016 (3 goals and 1 assist).
- Barcelona have scored in 46 of their last 47 group games in the competition, the only exception coming against Benfica in December 2012 (0-0) when Barca were already guaranteed of topping their group.
- No team has been benefited from more own goals in the 5 Top European leagues in all competitions than Barcelona (5).
- Luis Suarez has scored only one goal in his last 11 Champions League games (v PSG in March).
- Gerard Pique has been sent off for the first time in the Champions League (92 appearances).