Luis Suarez made the breakthrough just before the hour mark, before Lionel Messi scored twice in the final 20 minutes as the Spanish champions recovered from three straight league draws to close the gap on Los Blancos, who host Deportivo La Coruna on Saturday night.
Barcelona should have taken the lead in the ninth minute when Messi's quite stunning pass freed Suarez inside the Osasuna box, but the striker could only place his effort wide of the far post.
Suarez came even closer in the 13th minute after wriggling free inside the box and looking to pick out the bottom corner, only for the ball to smash against the post as Osasuna continued to ride their luck against the dominant hosts.
The Spanish champions had another golden chance in the 15th minute when Suarez released Messi in a dangerous position, but Osasuna goalkeeper Nauzet Perez somehow denied the Argentine with his left leg as three clear chances for Luis Enrique's side were wasted.
The onslaught continued and Barcelona had yet another clear opportunity in the 26th minute when Suarez set up Messi once again, but the forward's chipped effort was palmed over the crossbar by Perez.
For all Barcelona's pressure, Osasuna came close to making the breakthrough on the half-hour mark when Miguel de las Cuevas skipped past Jordi Alba before firing the ball towards the bottom corner, but Oriol Riera just could not make contact.
Andres Iniesta was next to come close for the away side, who had 80% of the ball in the first period, after striking one from distance, but the ball just flew wide, before Messi turned an Arda Turan cross wide of the far post as the two teams somehow entered the half-time break on level terms.
Osasuna's second clear chance of the match arrived in the 49th minute when Sergio Leon raced away from the Barcelona defence before sending the ball over Marc-Andre ter Stegen, but the crossbar came to the away side's rescue during what was an open period of the match.
Barcelona finally made the breakthrough in the 59th minute of action when Messi delivered a cute pass into Alba and the full-back crossed towards Suarez, who simply could not miss from close range.
Messi might have doubled the Catalan outfit's lead 20 minutes from time when the Argentine looked to pick out the bottom corner, but Perez was again on hand to make a smart save as one goal continued to separate the two teams.
Messi was not to be denied, however, and scored Barcelona's second in the 73rd minute when he turned another Alba cross into the back of the net to end Osasuna's hopes of a comeback in Pamplona.
Leon was Osasuna's best player on the afternoon and had another attempt from distance 10 minutes from time, but Ter Stegen made the save, before the Barcelona goalkeeper kept out an Alejandro Berenguer effort in the latter stages.
The visitors were not finished, however, and scored their third of the afternoon in the second minute of stoppage time when Messi danced into the Osasuna box before picking out the bottom corner.
Barcelona's final league game before the winter break is at home to Catalan rivals Espanyol next weekend, while the division's bottom club Osasuna will look to end their losing run when they travel to Deportivo La Coruna.