Suarez volleyed wide and Messi saw a free-kick saved as Barca controlled the opening quarter, but Claudio Bravo was called upon to make a smart stop at his near post after Jonathan raced through on the break for Deportivo.
Messi drew another good stop from German Lux with a curling effort before Suarez headed a Dani Alves cross over as Barca kept the visitors pinned in their own half.
But Lux could do nothing to prevent Messi giving the home side the lead six minutes before the break, as the Argentina captain curled a stunning free-kick into the top corner from an almost identical position to his earlier saved effort.
Deportivo began the second half much more brightly, with Jonathan missing two presentable openings, but the visitors had another let-off as Andres Iniesta’s clipped cross came back off the crossbar.
Suarez’s tap-in was ruled out for offside, but Rakitic gave Barca the cushion they wanted after 62 minutes, blasting the ball into the bottom-right corner having been given time and space 20 yards out.
Messi released Suarez for a third, but the Uruguay striker’s poked effort was saved comfortably by Lux, before substitute Cardoso fired wide following another break.
Deportivo themselves had a goal ruled out after Lucas Perez headed in a rebound only to see the offside flag raised, but hopes of a comeback were rekindled in the closing stages as the 27-year-old placed a shot past Bravo following Cardoso’s throughball into the box.
Faycal Fajr curled wide from distance, but Bergantinos swept a superb shot from the right of the area beyond Bravo’s despairing dive following another fast break led by Perez, with Barca held to just a second league draw of the season in dramatic fashion.