Barcelona had to play out the final 34 minutes a man down after Thiago Alcantara was red-carded but they still did enough to make it seven successive victories in the league.
Real, who led by 10 points going into last weekend’s matches, can restore their six-point lead later Saturday when they entertain Real Sociedad.
Barca were the better team and dominated possession throughout the first-half.
Their first opportunity came on 12 minutes when Dudu Aouate in the Mallorca goal came out to block a shot from Lionel Messi at close range.
Alvaro Gimenez had Mallorca’s only chance of the first-half eight minutes later when his header drifted wide of goal after a right wing cross from Michael Pereira.
On 25 minutes Barca went ahead when Messi, who broke the club’s all-time scoring record in midweek, floated a free-kick over the Mallorca defence and Sanchez got the slightest of glances to steer the ball past Aouate.
Barcelona continued to dominate and it was Sanchez again who thumped a shot onto the crossbar on 33 minutes before trying his luck from distance just before the break.
After a quiet start to the second-half the evening suddenly became complicated for Barcelona on 56 minutes when Thiago was sent-off for a second yellow card after the referee harshly deemed the midfielder had used his arm to control the ball.
Mallorca immediately launched their first attack of the second period and Cesc Fabregas was almost in danger of pulling down Jose Luis Marti in the penalty area.
However, from then on, Barcelona looked to kill the game with their passing game.
Pedro Rodriguez teed-up Messi, who shot just wide from 10 yards, before Pique wrapped the game up with 12 minutes remaining when he reacted quickest after a Messi shot hit the post.