A superb curling strike from Dries Mertens put the home side in front in the first half.
The goal helped the Belgian to draw level with Marek Hamsik as Napoli’s all-time top scorer in all competitions with 121 goals.
But Barca breached a well-drilled Napoli defence after the break when Griezmann fired in a Nelson Semedo cross.
The visitors ended the game with 10 men after Arturo Vidal was sent off late on for picking up two yellow cards in quick succession.
The two sides, who were facing each other for the first time, will meet again at the Camp Nou for the second leg on March 18.