The victory provisionally moved Madrid eight points clear of Barcelona at the top of the La Liga standings.
Mallorca had looked on course to claim a shock win after Tomer Hemed gave them a 39th-minute lead but Madrid drew level through substitute Gonzalo Higuain 18 minutes from time before Callejon netted an 84th-minute winner for Jose Mourinho's men.
The victory was Madrid's 22nd in their last 23 competitive matches and lifted them further clear of Barca, who play Real Betis on Sunday.
The comeback win will also give Madrid a further morale boost ahead of Wednesday's Copa del Rey quarter-final first leg against Barca at the Bernabeu.
Mallorca came into the match just three points above the relegation zone but they too would have been brimming with confidence after their stunning cup triumph over Real Sociedad on Wednesday, when they turned a 3-0 aggregate deficit into 6-3 triumph.
And it was the Balearic Island side who struck first when Tomer launched himself at Gonzalo Castro's inswinging cross and sent a glancing header past Iker Casillas to make it 1-0.
Madrid had created little to worry home goalkeeper Dudu Aouate prior to that but they came close to equalising on the stroke of half-time when Sergio Ramos' header from a Xabi Alonso free-kick came back off the post.
Mourinho opted to introduce Higuain at half-time in place of Lassana Diarra, but with Mallorca closing ranks at the back the visitors continued to find it hard to break down their opponents at the start of the second half.
Callejon felt he should have had a penalty when he went down in the box in the 57th minute, but the referee waved play on and Madrid were lucky to see Victor Casadesus incorrectly ruled offside when clean through as Mallorca immediately broke at the other end.
Mourinho then went for broke by sending on Kaka and Fabio Coentrao for Alvaro Arbeloa and Marcelo in a bid to get something out of the game.
However, Madrid came close to falling 2-0 down in the 67th minute when Michael Pereira tried his luck from the edge of the box and Casillas was forced into a full-length dive to turn the ball behind for a corner.
Nothing came from that though and soon after Madrid started to turn up the heat.
Aouate was called on to tip over a 25-yard effort from Kaka in the 71st minute and then, from Madrid's next attack, Higuain drew the visitors level.
Karim Benzema and Mesut Ozil linked up well before the Germany international threaded a pass into Higuain inside the area and the Argentinian's left-footed shot deflected off a challenging Mallorca defender before looping over Aouate and into the net.
Having finally made the breakthrough Madrid set about searching for the winner and Cristiano Ronaldo almost made it 2-1 two minutes later with a dipping long-range thunderbolt that came back off the crossbar.
Ramos thought he had scored but saw his header ruled out for a debatable offside, but a second Madrid goal looked on the cards and it duly arrived with six minutes remaining when Callejon slotted a shot inside the near post after Aouate had denied Higuain and Benzema in quick succession.