Sanchez netted the opening goal on 13 minutes when he accepted a lovely cushioned ball by Lionel Messi - who showed some delightful awareness to control the ball with his chest - to send a shot crashing high into the net for the opening goal.
Messi added the second goal when he played a lovely one-two with Andres Iniesta as he dashed into the visiting box to plant the ball beyond visiting goalkeeper Miguel Moya one minute before the break.
Messi has scored an astonishing 61 goals for Barcelona this season, but Pep Guardiola's team continued to look to bolster their goal difference after half-time.
Isaac Cuenca crossed for Sanchez to bury a header from close range on 72 minutes with Pedro doing likewise a couple of minutes later as he nodded into the Getafe net from Messi's free-kick.
Barcelona are one point adrift of Real Madrid, who will hope to regain a four-point advantage when they visit neighbours Atletico on Wednesday night.
Barca trailed Real by 10 points last month, but have been given fresh hope of the title with Jose Mourinho's side dropping points in draws with Malaga, Villarreal and Valencia.
Messi has scored in 14 of the 16 Liga fixtures at the Camp Nou this season. He did not play in the other two matches.
With a bit more luck, the home side might have had a few more goals. Some excellent goalkeeping by visiting goalkeeper Moya and sloppy finishing prevented Barca from adding to their winning total with Getafe - whose best effort saw a Ruben Perez shot deflect wide on 25 minutes - embarking on a damage limitation exercise.
Moya made an excellent stop to prevent Pedro from scoring on 15 minutes with Daniel Diaz forced to hook off his line a minute later after Xavi had chipped the ball over the grounded Moya.
Messi knocked an effort wide when he should have scored on 22 minutes with Sanchez prodding a shot into the side of the net from Cuenca's cross on 31 minutes.
Getafe looked increasingly ragged the longer the game progressed, but Moya denied Barca a fifth in the closing minutes as he stood tall to block a blistering shot by Messi with his defence cut open.