Juventus have also suffered upheaval since the sides last met in last season's quarter-finals as Allegri made six changes from their trip to the Camp Nou just five months ago when a 0-0 draw saw the visitors progress 3-0 on aggregate.
Despite Dembele's early promise, Barca struggled to create early on.
Their best effort before opening the scoring came when a Messi free-kick rebounded back into Luis Suarez's path and his fierce effort was turned over by Buffon.
Dembele was involved in the move as Messi broke his personal duck against Buffon in the final minute of the first half.
Messi picked up the Frenchman's pass before exchanging a one-two with Suarez and firing with unerring accuracy just inside the far post.
Juventus had a big chance to respond right at the start of the second half, but Paulo Dybala couldn't match his international teammate's finish and he lifted his shot over the bar.
Messi was inches away from his second as another rasping left-foot drive came back off the inside of the post, rebounded off the back of Buffon's head and dropped just wide.
Yet, Messi was also fortunate to escape his first ever red card at club level moments later as he was booked by Slovenian referee Tomaz Klancnik for his attempts to get a Juventus player cautioned.
Aided by his teammates, though, Messi continued his protests and could easily have been shown a second yellow by a more stringent official.
His clash with the referee only seemed to inspire Messi to greater heights as he drove through the Juventus defence once more and, when his low cross was only partially cleared by Stefano Sturaro, Rakitic slotted home the rebound.
Buffon momentarily denied Messi his double with a fine save from a free-kick.
However, the veteran goalkeeper was helpless once more 21 minutes from time when Messi cut inside onto his left foot and buried the ball into the bottom corner for his eighth goal of the season already.