The Argentine forward, playing for the first time since the Christmas break, also hit the crossbar in a display so impressive that even many of the Atletico fans stood and applauded him when he was replaced near the end.
Barcelona made most of the early running at a chilly Vicente Calderon despite resting key players from the team who beat Real Mallorca at the weekend, including Xavi and Samuel Eto'o.
A deft piece of skill from Daniel Alves unlocked the Atletico defence for Messi's opening goal on 12 minutes.
The Argentine international played the ball inside and Alves sent a clever backheel through for him to run on and place a low shot past Gregory Coupet.
Atletico had to play with 10 men for most of the second half after defender John Heitinga felled Messi in the penalty area as he was racing to meet an Alves cross.
The referee showed the Dutchman a red card and Messi sent Coupet the wrong way to double Barca's lead.
Atletico substitute Tomas Ujfalusi pulled a goal back just over 10 minutes later with a header from Simao Sabrosa's corner, but the margin was restored when Messi completed his hat-trick on 80 minutes.
The playmaker picked the ball up in the area, wrong-footed Coupet and lifted the ball into the roof of the net.
Seconds earlier, he had weaved his way through the Atletico defences and crashed a shot against the bar.
Barcelona coach Pep Guardiola said his side, who lead the Primera Liga by 11 points, had made a big step towards the quarter-finals ahead of next week's second leg.
"I am very satisfied with the effort the players made tonight," he said. "We kept up a good level of intensity and Messi was magnificent."
Guardiola's counterpart at Atletico, Javier Aguirre, also paid tribute to Messi.
"He's playing at an extraordinary level. He also has a lot of confidence and that's very positive for his team," Aguirre said.
"We were never really in the game in the first half but in the second half we came out much more brightly.
"But going two down and also down to 10 men against Barca is very complicated. Let's see what happens next week."
There are five more Copa del Rey first leg matches on Wednesday, including holders Valencia's trip to face Racing Santander and 2007 winners Sevilla's match at home to Deportivo Coruna.
The only remaining non-Primera Liga clubs Real Union and Poli Ejido of the Segunda B, who are at home to Real Betis and Espanyol respectively.
The northern derby between the Primera Liga's bottom club Osasuna and 23-times winners Athletic Bilbao is on Thursday, when Mallorca host Hugo Sanchez's Almeria.
Sporting Gijon v Real Valladolid
Sevilla v Deportivo Coruna
Racing Santander v Valencia
Real Union de Irun v Real Betis
Ejido v Espanyol
Osasuna v Athletic Bilbao
Real Mallorca v Almeria