Messi slotted in a low shot with 76 minutes on the clock, after Barca had been frustrated for long periods by the visitors’ five-man back line.
The Catalans had over 80 per cent of the possession in the first half and looked dangerous in attack, with Jordi Alba playing high on the left, almost as a fourth forward at times.
But Messi fired a free-kick just over the bar and hit a shot just the wrong side of the post in the opening 45 minutes, while youngster Ansu Fati was denied by Granada goalkeeper Rui Silva and hit another effort over the top.
In the second half, it began to look like Barca might be denied, but Granada defender German Sanchez was sent off for a second bookable offence after 69 minutes and moments later, Setien sent on youngster Riqui Puig for Ivan Rakitic.
Puig won the ball back for the goal five minutes later, with Messi finding Antoine Griezmann, the French forward laying off for Arturo Vidal and the Chilean teeing up the Argentine with a short pass just inside the area.
The six-time Ballon d’Or winner, who had also scored the opening goal under previous coaches Luis Enrique and Ernesto Valverde, did the rest as he drove a low shot past Rui Silva.
Griezmann, who had earlier tracked back almost to the corner flag to win the ball back for his side, crashed a fierce shot into the side netting as Barca sought a second late on.
But one goal was enough to make it a happy to start for Setien and Barca return to the top of La Liga thanks to their win, moving ahead of rivals Real Madrid on goal difference after 20 round of matches.
Granada, meanwhile, stay in 10th place.
Can't see the blog? Click here for the desktop version.