It was a different story for Jose Mourinho, though, as Chelsea made a losing start for the first time as Basel came from behind to win 2-1 in London and add to the difficulties of the "Special One" during his Stamford Bridge homecoming.
Last season's runner-up Borussia Dortmund also had a bad night, losing 2-1 at Napoli with both coach Juergen Klopp and goalkeeper Roman Weidenfeller being sent off.
Seven-time champion AC Milan struggled, too, before two late goals gave the injury-hit Rossoneri a 2-0 victory at home to Celtic.
Meanwhile, Theo Walcott and Aaron Ramsey scored as Arsenal opened its 16th straight campaign in the top European competition with a 2-1 win at Marseille to join Napoli atop Group F.
Elsewhere, it was: Atletico Madrid 3, Zenit St. Petersburg 1; Schalke 3, Steaua Bucharest 0; and Austria Vienna 0, Porto 1.
At the Camp Nou, Messi scored his 60th, 61st and 62nd career goals in his 80th Champions League match.
"Barcelona is full of individual talents," Barcelona coach Gerardo Martino said. "Today we can talk about Messi and Valdes, another day Xavi or Neymar. It is normal that one of them rises to the occasion."
Messi, the four-time FIFA world player of the year, opened the scoring in the 22nd minute after he was fouled on the edge of Ajax's area, then stepped up to fire in a perfect-placed free kick.
The Argentina forward doubled the hosts' advantage in the 55th by hitting on the break when Ajax was caught looking for the equalizer.
Neymar, on his European debut, set up Gerard Pique to add Barcelona's third goal in the 69th before Messi completed his hat trick in the 75th.
Messi's treble leaves him nine goals short of Raul Gonzalez's all-time record of 71.
Barcelona and Milan top Group H, although the Rossoneri didn't take the lead until eight minutes from time with an own goal before Sulley Muntari sealed the result two minutes later.
In London, boos rang out at the final whistle after Marco Streller clinched Basel's first-ever win in England in the 82nd minute by flicking a header past goalkeeper Petr Cech after seizing on slack defending.
"I am responsible for everything," Mourinho said. "Especially after a bad result. In the good moments I want everyone to shine, in the bad moments I want everyone to keep calm."
Although Oscar lit up a drab start by putting Chelsea in front before halftime, Mohamed Salah began the Swiss side's comeback in the 71st by bending in an equalizer before Streller ensured that Chelsea's worst start to a season in the decade under Roman Abramovich's ownership was prolonged.
Basel and Schalke share the Group E lead.
In Italy, prized signing Gonzalo Higuain put Napoli ahead 29 minutes in on a rainy night at San Paolo stadium by heading home a cross from Camilo Zuniga, after which Klopp was sent off for protesting.
Higuain was also at the centre of the action when Weidenfeller was shown a red card for using his hands outside his area to deny the striker in first-half added time.
Zuniga scored an own goal for Dortmund in the 87th with a poorly intercepted cross.
Napoli and Arsenal meet next in Group F.