The Barcelona star netted a right-footed effort at the near post just two minutes and eight seconds into the Champions League last-16 second-leg tie at Camp Nou.
That strike was the earliest the 30-year-old Argentine has ever scored in a game either for club or country.
Barcelona took a 2-1 lead on aggregate with Messi's strike.
The goal was the 601st of Messi's illustrious career, after he reached the 600-goal mark against Atletico on March 4.
Just 18 minutes later, Messi stole the ball away from Cesc Fabregas and beat a pair of defenders before assisting for Dembele, who made it 2-0 on the night and 3-1 on aggregate.
That goal was the first Dembele had scored for Barcelona since his big-money move from Borussia Dortmund last summer.
Dembele has struggled with injuries during his debut season at Camp Nou, but finally opened his account for Barca on his 12th appearance for the club.
Messi would go on to add a second goal on the night in the second half – the 100th Champions League strike of his career.
Barcelona won the match 3-0 on the night, advancing to the quarter-finals with a 4-1 aggregate triumph.