Messi’s first-half penalty after Pedri was felled was cancelled out by Alex Fernandez’s last-minute penalty.
Cadiz’s equaliser, from their only shot on goal, ended Barca’s seven-match-winning run in La Liga.
Barca can now be overtaken in third if Sevilla beat Osasuna on Monday.
Barcelona could have moved to within six points of leaders Atletico Madrid if they had overcome Cadiz, who brought their four-game losing run to an end with their late dramatics at the Nou Camp.
Apart from Ruben Sobrino bundling an awkward shot wide just minutes after Messi gave Barca the lead, Cadiz rarely threatened.
But the hosts were left frustrated as Messi’s penalty – coolly taken after Pedri was sandwiched in a tackle between Salvi and Isaac Carcelen – was all they had to show despite controlling 81% possession and having 20 shots.
For the Argentine, who is out of contract at Barca in the summer and whose future at the Nou Camp remains a key point in the club’s upcoming presidential elections, it was a milestone day as he passed former team-mate Xavi to set a new club record for Barca appearances in Spain’s top flight.
Inspired Cadiz goalkeeper Jeremias Ledesma, who was instrumental in their 2-1 win over Barca in December, was again hugely influential as he made a string of saves to keep out Messi and Antoine Griezmann.
Frenkie de Jong and Pedri both also had goals disallowed before the break and Ousmane Dembele was lively for the hosts, but Cadiz earned their point with a stoic defensive display.
Clement Lenglet’s foul on Sobrino ultimately proved decisive to give away the late penalty, with Fernandez converting. (Courtesy BBC)