Ireland were on the verge of securing a draw against the World Champions, following a Conor Murray try, but Carter struck at the death.
The All Blacks crushed Declan Kidney's men 42-10 in the first Test in Auckland but they were made to battle all the way in Christchurch.
In front of a 21,000 sell-out crowd at the newly developed AMI Stadium, the Kiwis were rocked by Ireland's bright start.
Sexton fired a penalty into the corner and Ireland's pack rumbled forward. They were just about held short but Murray was able to snipe over from close range.
Sexton converted the effort and slotted a penalty to stretch his sides lead but New Zealand fought back into the game and Carter banged over a succession of penalties.
The All Blacks came out firing in the second-half and were rewarded with a Aaron Smith try on 43 minutes. Carter slotted the tricky conversion to hand his side a 16-10 lead as Ireland appeared dead and buried.
Carter and his opposite number Sexton exchanged kicks at goal before the Leinster pivot edged Ireland level.
New Zealand were dealt a blow on 72-minutes when Israel Dagg was sent to the sin-bin for a challenge on Rob Kearney.
But Ireland failed to take advantage as Sexton's long-range penalty fell agonisingly short. They appeared set to hold on for a respectable draw but with just seconds to spare Carter slotted the match-winning drop goal.