It was a fourth league win in five games for Ronald Koeman's side, who kept the pressure on at the top – now just two points behind Atletico ahead of Sunday's derby with Real Madrid.
The home side looked to have been reduced to 10 men after just 21 minutes when goalkeeper Sergio Herrera was shown a red card after a handball outside the penalty area as Lionel Messi tried to go around him.
However, the decision was reviewed by VAR, with Messi ruled to have been offside in the build-up, so Herrera was reprieved.
Barcelona broke the deadlock on the half-hour when a sweeping pass from Messi picked out Jordi Alba as he raced into the left side of the Osasuna penalty area to fire an angled drive into the roof of the net.
Ter Stegen had to be alert again in the 34th minute to push away Ruben Garcia's shot across goal before Messi rolled a shot just wide of the far corner.
Koeman made a tactical change for the second half, as Ousmane Dembele replaced Umtiti.
Messi – seeking to reach 20 goals for what would be a 13th consecutive LaLiga campaign – forced Herrera into action with a 25-yard effort.
As the hour mark passed, Barca broke clear but Griezmann hit his shot from the edge of the penalty area straight at defender Aridane Hernandez, with the French forward soon replaced by Martin Braithwaite.
Osasuna came close to an equaliser in the 70th minute when Jonathan Calleri's diving header dropped just off target from Garcia's cross.
With eight minutes left, Messi set up Moriba on the edge of the box, and the 18-year-old curled a fine left-foot effort into the top corner.