Messi is now also the undisputed all-time top-scorer in the history of European football, having overtaken the previous record of 67 goals scored by German legend Gerd Mueller for Bayern Munich in a single season in the 1970s.
In the Spanish capital a party atmosphere reigned following Real's 32nd league title triumph but they were heading for defeat until Ronaldo equalised an early Franco Jara goal from the spot ten minutes from time.
Then, in a dramatic finale an own-goal from David Cortes gave Jose Mourinho's men the victory.
It was an unfamiliar looking Real side as Mourinho gave a run out to players who have not been regulars, with Ricardo Carvalho coming into defence and Nuri Sahin and Esteban Granero paired together in the centre of the pitch.
Granada, still looking to secure their own top flight status, took full advantage of their uncertainty as they took the lead after just four minutes through Jara.
The forward stole the ball off Marcelo midway through the Real half and ran through on goal before slotting the ball through the legs of reserve keeper Antonio Adan, standing in for Iker Casillas.
Minutes later Odion Ighalo's strike was blocked well by the keeper and then his follow-up was cleared off the line by Marcelo.
Ronaldo then headed over and Kaka, left unmarked, fired over inside the area but they remained exposed at the back. Marcelo was again called on to head away a Jara shot which was heading for the bottom corner.
Karim Benzema was inches away from equalising shortly before the hour mark with a strike from a tight angle which came back off the post and then Ronaldo shot at the keeper Julio Cesar instead of passing to Gonzalo Higuain.
Ronaldo finally levelled for the champions from the spot after a foul in the area, and Granada suffered heartbreak in the dying moments when Cortes scored an own goal.
Barcelona were without the injured Gerard Pique and Alexis Sanchez while Xavi Hernandez was only fit enough for the bench. Seydou Keita kept his place in midfield and Pedro Rodriguez's return to form in front of goal saw him start in attack.
Barca took the lead after just 12 minutes through a Messi free-kick which clipped off the top of the wall and past keeper Cristian Alvarez.
-AAP