Dominik Kahun and Patrick Kane scored, and Collin Delia made 47 saves, including 18 in the third period, for Chicago (15-21-7), which had won five of seven. The Blackhawks were outshot 50-21.
"We got some good goaltending and found a way to score on the power play, got ourselves to overtime," Chicago coach Jeremy Colliton said. "We could've gotten two (points), but that type of performance probably won't produce points over time, so we'll have to be better."
Kahun gave the Blackhawks a 1-0 lead at 3:05 of the first period when he backhanded Brandon Saad's rebound past Lehner for his sixth goal of the season.
Barzal scored his seventh goal in the past six games with a shot from the left face-off circle at 6:47 to tie it 1-1.
New York outshot Chicago 14-3 in the first period.
"I thought Mat was really good," Trotz said. "He managed the puck really well, he was challenging seams, he was taking ice that was presented, he was going at people. I thought it was a pretty complete game."