Ante Budimir had given Osasuna the lead in the first half, but Mario Soriano levelled with a free-kick after the interval before Nsongo completed the turnaround in the 87th minute.
The result was particularly important for Antonio Hidalgo's side, who had gone six matches without a victory and were looking to move further away from the relegation zone.
Osasuna head coach Jagoba Arrasate was left frustrated by his team's inability to protect their advantage, particularly after taking the lead and producing a promising finish to the first half.
"We started badly, with a couple of gifts, and Sergio was brilliant and kept us in the game," Arrasate explained. "From there, we grew into it and scored through a high press. I think we finished the first half well."
Budimir's goal had put the visitors in front, but Deportivo gradually increased the pressure after the break, with Soriano restoring parity from a free-kick in the 64th minute.
Arrasate acknowledged that his team had struggled to cope with Deportivo's second-half intensity.
"We knew Deportivo would put us under pressure in the second half and had substitutions available to change the course of the game," he said. "The goal hurts us again because we had possession under control in midfield, lost the ball, conceded a slightly dubious free-kick and Soriano scored."
The Osasuna coach also felt his side needed to retain possession for longer rather than allowing themselves to become increasingly defensive.
"After the equaliser, we needed to have more of the ball and put together more sequences of play so we could defend better," he added.
Instead, Deportivo continued to push forward and were rewarded when Adama Traore produced an excellent individual run and delivered a cross into the penalty area. Pierre-Emerick Aubameyang, making his return after injury, got his head to the ball and forced Sergio Herrera into an excellent save, but Nsongo reacted quickest to the rebound to score the winner.
Hidalgo was delighted with the character his players showed to recover from going behind.
"We have been able to turn the scoreline around through a lot of hard work and, above all, a lot of calmness so that we didn't lose our heads," the Deportivo coach said.
The victory was especially satisfying after a difficult run of results, although Hidalgo was keen to move on quickly and focus on their next assignment.
"It's a good victory. We now have to concentrate on the match in Barcelona. This is about winning, and today we have taken three points," he said.
Aubameyang's contribution was another positive for Deportivo, with the forward's return providing an important boost and his involvement helping create the decisive goal.
Hidalgo praised the commitment the striker had shown to return to action as quickly as possible.
"Aubameyang did everything possible to come back quickly. He sacrificed a lot of things to be with us and gave us that header which led to Nsongo's goal. He is a very special player for us," he said.
For Osasuna, the defeat represented another damaging away-day result. Having conceded twice against Sevilla in their previous away fixture, they again failed to hold on after taking the lead.
Arrasate admitted his side needed to become more resilient on their travels if they were to collect points consistently.
"For us, it is a very painful defeat. Away from home, we conceded twice the other day and now twice again. Today it is even worse because we started the match winning, and we need to be more solid away from home because otherwise it is very difficult to pick up points," he said.
Deportivo's comeback provided a timely lift, while Osasuna were left to reflect on another opportunity lost after surrendering a winning position.
