Carter slotted an 80th-minute drop goal for the All Blacks to give them a 22-19 victory over Brian O'Driscoll's side, which sealed victory in the three-match series with a game to spare.
"Dan pulled up with a sore hamstring after training on Tuesday," Hansen said of Carter's injury.
"On assessment, he has suffered a mild hamstring strain to his right leg which has unfortunately ruled him out of this weekend's test.
"He will undergo further assessment over the next few days to determine when he will be fit to return to rugby."
Carter will be replaced by Aaron Cruden in the starting side in Hamilton on Saturday and the uncapped Beauden Barrett is named on the replacements' bench.
Canterbury Crusaders lock Luke Romano was named to start in his first test. He replaces Brodie Retallick who has dropped to the bench.
Veteran lock Ali Williams had already been ruled out of the match and had to undergo knee surgery earlier this week.
Hansen was also forced to re-jig his loose forward combination after number eight Kieran Read was ruled out with concussion following a head knock in the match at Rugby League Park, which was played in frigid conditions.
Captain Richie McCaw will move from openside flanker to number eight with Sam Cane, who replaced Read at halftime in Christchurch, making his first start. Liam Messam will return to the side as blindside flanker.
Messam was not originally in the squad but was brought in as cover for the injured Victor Vito. Adam Thomson drops to the bench after he took several knocks to his head and face last Saturday, which aggravated his broken nose.
The coach also changed both starting wingers with Julian Savea and Zac Guildford dropping out of the matchday 22 and being replaced by Hosea Gear and Ben Smith respectively.
"It was a tough, high-pressure test," Hansen said of the Christchurch match. "It said a lot about the character of both teams and I believe this third test will see the same character and composure needed.
"The All Blacks, by their own admission, weren't happy with the way they performed on Saturday, and in part this is a credit to the way the Irish played.
"They have laid down a challenge and the key will be now how we respond."
New Zealand: 15-Israel Dagg; 14-Ben Smith, 13-Conrad Smith, 12-Sonny Bill Williams, 11-Hosea Gear; 10-Aaron Cruden, 9-Aaron Smith; 8-Richie McCaw (captain), 7-Sam Cane, 6-Liam Messam, 5-Sam Whitelock, 4-Luke Romano, 3-Owen Franks, 2-Andrew Hore, 1-Tony Woodcock
Replacements: 16-Keven Mealamu, 17-Ben Franks, 18-Brodie Retallick, 19-Adam Thomson, 20-Piri Weepu, 21-Beauden Barrett, 22-Tamati Ellison