Cesc Fabregas bagged a double in the first hour before the Argentine substitute took over, netting from close range before rifling home an emphatic late strike
Cesc Fabregas scored in either half to put the hosts in control before Messi was introduced on the hour mark to steal the show, netting calmly from close range before rifling home after a surging late run to put Barca firmly in charge of the tie.
Messi started on the bench as Gerardo Martino partnered Javier Mascherano and Carles Puyol at the heart of defence, while Neymar was rested from the matchday squad. Getafe deployed Ciprian Marica as a lone striker, with Pablo Sarabia charged with linking the defence to the attack along with captain Jaime Gavilan.
The first half started brightly, with Andres Iniesta bringing the first save out of Codina before Rafa turned away Alexis' dangerous cross from in front of his own goal.
But the visitors' resistance did not last long, as Sergio Busquet's blocked volley dropped to Pedro inside the area, and his chipped cross was headed home by the arriving Fabregas.
Getafe responded well, with Sarabia twice causing Mascherano some problems, before Carles Puyol glanced a header wide from a corner.
Jose Pinto was then called into action to make a brilliant save to deny Rodriguez, parrying his glancing header away after a dangerous free kick from the right.
Barca continued to dominate the ball without creating any real clear-cut openings, while Getafe looked a threat on the break. Ciprian Marica headed over from inside the area before the lively Sarabia fired high and wide from distance after a good run.
The home side came close to a second shortly after the break as Pedro's cross was turned just beyond the far post before Fabregas came close with a near-post volley.
But they did not have long to wait to double their lead. Pedro raced clear from Fabregas' pass, only to be brought down by Valera, allowing the 26-year-old to rifle home the penalty.
The biggest cheer of the night followed moments later, when Messi returned to action for the first time since November, replacing Andres Iniesta.
The Argentine almost provided a goal for Pedro, too, bursting down the left and clipping a delightful cross to the far post which the Spaniard just failed to reach.
But it didn't take him long to make his mark. Busquets clipped the ball through to Montoya and Messi calmly rolled in the rebound to send Camp Nou into raptures.
Messi then rippled the side netting with a wicked free kick before he capped a brilliant night for the hosts with the goal of the game. Substitute Alex Song played him through behind the defence and Messi raced clear before firing high and hard past Codina to put the tie all-but-beyond Getafe.