Atletico looked to be securing their first La Liga win over Barcelona since 2010 when Diego Costa headed home in the 77th minute, but Dembele levelled the scores in the latter stages.
The result means that Barcelona remain top of the table, one point clear of second-placed Atletico, who have moved above Sevilla.
Barcelona had more than 75% of the ball in the first 10 minutes, with the champions immediately taking control of the possession against the counter-attacking hosts.
Sergi Roberto might have done better after finding himself free in the Atletico box in the 21st minute, with the Spaniard simply chipping a cross into the arms of the home side's goalkeeper Jan Oblak.
Atletico had some positive moments on the break, but too often the final pass went astray, and the match reached 35 minutes with neither side having a meaningful opportunity in the capital.
Messi had the chance to test Oblak from a free kick five minutes before the break, but the Argentine's effort was far too high, and it just about summed up the first half in terms of attacking play from both teams.
Barcelona actually finished the first half with 10 men as Roberto hobbled off with a hamstring injury in the closing stages, and he was replaced by Rafinha at the start of the second period.
Messi had the first sight of goal in the second half, but his long-range strike in the 56th minute was always moving wide of the home side's post.
Atletico had a golden chance to take the lead just before the hour when Antoine Griezmann raced away from Arthur before delivering a dangerous low cross into Costa, but Gerard Pique just beat the out-of-form striker to the ball.
Vitolo replaced Thomas Lemar in the 64th minute as Simeone freshened his midfield, but the flow of the match did not change as both defences held firm.
Atletico wanted a penalty in the 75th minute when Arturo Vidal appeared to handle inside the box, but following a VAR check, play continued.
The home side made the breakthrough two minutes later, however, when Costa headed a Griezmann corner home at the far post for his first ever goal against Barcelona. It was also the striker's first league goal since February, and it sparked huge celebrations inside the stadium.
Messi had a late free kick deflected over the Atletico crossbar as the away side looked for a leveller, and it was not a surprise that the champions equalised through some excellent work from the Argentine.
Indeed, it was Messi who found substitute Dembele with a pass inside the Atletico box, and the Frenchman checked inside before finding the back of the net, albeit with the help of a deflection off Lucas Hernandez.
The draw was Atletico's sixth in the league this term, while Barcelona have now dropped points in six of their 13 top-flight fixtures during the 2018-19 campaign.
ATLETICO MADRID (4-4-2): Oblak; Arias, Lucas, Savic, Luis; Saul, Koke, Rodrigo, Lemar (Vitolo 64'); Costa (Correa 80'), Griezmann
BARCELONA (4-4-2): Ter Stegen; Semedo, Umtiti, Pique, Alba; Roberto (Rafinha 46'), Vidal (Malcom 85'), Busquets, Arthur (Dembele 80'); Suarez, Messibody check tags ::