Nathan Gerbe quickly answered a goal by the Pens' Sidney Crosby early in the second period and the Canes lead 2-1 after 40 minutes.
Crosby scored 16 seconds into the second period with a backhander past Canes goalie Justin Peters for a 1-1 tie. It was Crosby's 21st of the season.
But Gerbe scored 14 seconds after Crosby, outfighting Pens defenseman Matt Nsikanen in front and whacking the puck past goalie Marc-Andre Fleury. Gerbe's eighth gave the Canes the 2-1 lead they maintained throughout the second.
Andrej Sekera's goal with less than two seconds left in the first period gave the Canes a 1-0 lead.
Digital Access for only $0.99
For the most comprehensive local coverage, subscribe today.
Sekera, lifting a backhander, scored his seventh goal of the season. The play was reviewed by replays showed the puck crossed the goal line with 1.8 seconds left.
The Canes nearly scored a few seconds earlier as Alexander Semin made a centering pass to Gerbe, whose tip was stopped by Fleury. The play continued and Sekera scored.
The Canes outshot the Pens 16-7 in the opening period but had few quality scoring chances until the end. In one sequence, Semin picked off a Pens pass in the slot and rifled a shot that went over the net, the puck banging hard off the glass, then off the top of the net before Fleury snagged it.
The Pens got the puck over the goal lone with 1:01 left in the first but didn't score. During a scrum in front of the Canes net, goalie Justin Peters and defenseman Ron Hainsey smothered a shot by Chris Conner. The Pens' Brandon Sutter and Chuck Kobasew kept poking at the puck and the whistle sounded.
After a review, referee Francois St. Laurent said the puck did cross the goal line but that the whistle already had sounded to stop play. No goal.
The Canes had a 26-16 shooting edge after two periods. Peters made a stop on a point-blank shot by the Pens' James Neal with 5:25 left in the second, Neal flashing in front and taking a pass from Crosby. Moments later, Fleury twice stopped the Canes' Zach Boychuk.
Both teams were coming off unsettling losses before the Christmas break. The Canes lost a third-period lead and then the game to the Columbus Blue Jackets 4-3, and the Pens were shut out 5-0 at Ottawa.
Pittsburgh did win seven straight games before the shutout loss and lead the Eastern Conference. The Canes were 1-3-3 in their last seven.