"I am proud that the talent is coming through and we are close to matching a team like New Zealand because there has been one or two points difference in the last three matches we played in Cape Town‚ Wellington and Pretoria‚" he said.
"You have got to have belief deep down that you can back".
"He was injured late in the first half", Page explained to reporters.
Barrett slotted his second penalty of the afternoon after 35 minutes and there was no further addition to the scoreboard as they went to the break tied 6-6 but the Springboks looked the better side as they dominated possession and territory.
A 79th-minute Ardie Savea try brought the teams level and Richie Mo'unga kicked a simple conversion to win the match.
Springboks captain Siya Kolisi said "That's why they're the No. 1 team in the world". I just really think the rivalry is back. That makes us proud until the last minute today, three weeks ago and at Newlands past year. "Never giving in. Keep knocking on the door". You have your bench there and you need to use them.
Hansen had praise for the improved Boks, whom his side had humiliated 57-0 in last year's Rugby Championship under former coach Allister Coetzee.
"There are young players who haven't been in a position where they are behind before".
"There have been two points separating us in the last two matches".
New Zealand had already sealed a third successive Rugby Championship trophy win after victory on Argentina last week.
The All Blacks came back from the dead twice, scoring two tries in the dying minutes to beat South Africa 32-30 and exact revenge for a painful home loss to the Springboks three weeks ago.