The away side were 3-0 ahead inside 18 minutes with strikes from Jordi Alba, Cristian Tello and Messi. However, a penalty from Pizzi and a long-range effort from Alex Bergantinos cut the score to 3-2.
Barcelona extended their lead to 4-2 with Messi's second before the break, but Deportivo hit back through a Pizzi free kick early in the second period.
It appeared to be all over when Messi added his third after 77 minutes, but the away side were made to sweat when Alba turned into his own net 10 minutes from time.
Here, Sports Mole dissects the 90 minutes of action between the two La Liga rivals.
On target 7
On target 6
Was the result fair?
This is a really difficult one. Barcelona controlled possession for large periods of the match, but the home side looked just as dangerous in attacking areas. Deportivo had more shots overall – and indeed more on target – than their opponents, but superior finishing was ultimately the difference.
7/10. Having lost three goals inside 18 minutes to arguably the best team in the world, you would have been forgiven for thinking that Deportivo would roll over and die, but they did the opposite. They displayed a wonderful attitude to keep on coming back at Barcelona, but they ultimately fell just short of what was required.
6/10. It was bit of a mixed bag from Barcelona this evening. They displayed their wonderful attacking ability and vulnerability in defence in equal measure. Messi and Cesc Fabregas were their star players this evening, but there are genuine concerns about the quality of their defence. However, even when Deportivo kept on coming, you never really thought that Barcelona would lose the game.
Sports Mole's man of the match
Lionel Messi: Cesc Fabregas came close to this accolade with three fine assists. But ultimately it must go to the genius that is Messi. The Argentine has now scored 21 hat-tricks in his career.
Biggest gaffe of the match
Victor Valdes had an absolute horror show when he allowed a Bergantinos effort to slip through his grasp after 37 minutes. It was a real howler on a nervy night for Spain's number two goalkeeper.
Jose Paradas Romero had a bit of a mixed bag this evening. The Spaniard rightly awarded Deportivo a penalty in the first half. However, his decision to send Barcelona defender Javier Mascherano from the field will be called into question.
Deportivo: Deportivo will attempt to return to winning ways in La Liga when they travel to Celta Vigo next Saturday.
Barcelona: Barcelona return to Champions League duty at home to Celtic on Wednesday before travelling to Rayo Vallecano in the league next Saturday.