South Africa ended a three-game losing streak when replacement five-eighths Elton Jantjies kicked an injury-time penalty goal to claim the win.
Nienaber said: "It's been a tough four weeks in that we surrendered momentum by not getting victories in the first three games.
"When you look at…those are the margins when Nos 1, 2 and 3 deal with when they play against each other. In this game, we were fortunate in that we got our opportunity at the end of the game to win because, last week, New Zealand had that opportunity."
Undeterred by what he called 'white noise' in the public criticising the Springboks' style and their over-dependence on their kicking game, the South Africans stuck to their plan by extending it with unorthodox use of their bench and more running play and came through to win.
"We kept going through our processes and going through our reviews and making new plans for the next weekend," he said.
"When you play against quality teams, the margins are so small. We were 20 seconds away from winning the Test against Australia, two or three minutes away from beating New Zealand last week.
"And this week, I think we got the last call of the game.
"The margins are so small – it's the bounce of the ball here or a misread there," he said.
Nienaber's use of his bench, replacing his front row two minutes before halftime, and then bringing on Frans Steyn at fullback proved crucial to the outcome.
"Frans was brilliant. Willie [le Roux] had a few good touches in the game, and there was some good play from him, but I wanted to bring in Frans for the 50/22 kicks. He trained well with us and did very well when called upon," he said.
Explaining his front row move, Nienaber said, "We see them as a combination, and the minutes played will never be the same. The first group has to do a specific job, and once they've done that, then the next group can come on.
"Today, I felt they emptied their tanks with what they were trying to do. They did their job, and that's why that front-row substitution happened.
"After last week, [when injury frustrated his plans to have first five-eighths Elton Jantjies get on the field] I decided we should make use of our subs. We must never keep a substitution on the bench, they are there to fulfil a role," he said.