Gesell's basket was the team's first after a 4-minute drought, but it ended up providing the winning margin on a night when the Hawkeyes won despite shooting 33 percent and going 3 for 20 from 3-point range.
After UNC's Marcus Paige missed a 3-pointer for the tie, Gesell hit two free throws with 1 second left to seal a win that had Hawkeyes players running onto the court to celebrate at the horn.
Kennedy Meeks had 15 points and 12 rebounds for UNC, which shot just 28 percent and never found any type of offensive rhythm.
Paige finished with 13 points, but went 4 for 16 from the floor and just 3 of 12 from behind the arc - including when he clanged one off the front rim in the final seconds. Paige, a preseason Associated Press All-American, also was called for a charge with 50 seconds left while driving into the paint after Gesell's three-point play.
North Carolina pulled down 24 offensive rebounds but repeatedly missed second and third looks off those extra chances and shot just 14 for 30 in the paint.
Meanwhile, the Hawkeyes grabbed 16 offensive rebounds and scored 12 second-chance points after halftime, critical considering Iowa missed all 12 of its 3-point shots.
Adam Woodbury added 11 points for Iowa, and Aaron White scored 10 - all at the foul line - despite going 0 for 6 from the field.