The hosts took an early lead through Nolito but Alfaro levelled not long after.
Granada had the greater number of chances throughout the match but a last-gasp headed goal by substitute Tomer Hemed gave the visitors all three points and their first win of 2013.
The hosts began stronger, controlling possession and creating early chances. Diego Buonanotte fired the first warning shot when he tested the Mallorca goalkeeper Auoate on six minutes and two minutes later Nolito opened the scoring.
Full-back Juanma Ortiz, only in the side due to the absence of suspended Allan Nyom, showed skill to beat his opposite number Luna and then put in a fine cross which Nolito, unmarked, headed into the back of the net.
However, it was not long until Mallorca pulled themselves level. Giovani dos Santos burst down the left wing, raced into the box and delivered a perfect low cross right into the path of Alfaro, who nudged the ball in from a couple of yards.
Mallorca then came close to taking the lead when Victor Casadesus headed a shot towards the far corner but it was kept out by a fantastic leap by Granada goalkeeper Tono Martinez.
Shortly before half-time, it was the Mallorca goalkeeper who kept the scores level, Auoate saving an effort from Nolito with his legs.
Aranda missed three chances to score in the second half as Granada pushed on for a winner but then Tono came to his side's rescue again, keeping out a volley by Casadesus.
The Andalusians kept up the pressure, although Mallorca substitute Hemed, who replaced Casadesus on 70 minutes, struck the post late on.
Before the match, Mallorca coach Gregorio Manzano insisted only a win would do for his struggling side, but when Dos Santos failed to prevent a ball going out for a throw in two and a half minutes into added time, it seemed as if they were going to have to settle for a draw.
However, they won a corner in the 93rd minute. Dos Santos whipped it in and Hemed rose to head the ball towards goal. Tono got a hand to the ball but could not prevent it from going over the line and, to the delight of the Mallorca players, the linesman awarded the goal. The final whistle was then sounded before Granada could re-start the match.
Mallorca are still in deep trouble but the manner of their victory on Sunday will give them belief that they can still achieve survival.
Granada looked to be headed clear of danger after the positive start Lucas Alcaraz made to his second reign in charge of the team, but following three successive defeats they could find themselves on the brink of the relegation zone by the end of on Sunday, depending on Celta and Real Zaragoza's results.