J.T. Compher also scored and Mikko Rantanen sealed the win with a late empty-netter as the Avalanche knocked off the Penguins for the second time in a week to sweep the season series.
Barrie scored his first goal since Oct. 13 in the first period. He followed that up with another in the second for his fifth career two-goal game.
Chad Ruhwedel and Evgeni Malkin found the net for the Penguins, who finished a three-game trip with a 1-2 mark. Pittsburgh was a little unfortunate in the second period when Josh Archibald's shot trickled through the pads of Varlamov, clanged off the post, stood on its edge for a moment and fell down on the line for no goal.
Malkin lined in a shot just 1:25 into the third to make it 3-2. Ryan Reaves nearly tied it late in the third, but his wrist shot down low clanged off the post. Matthew Murray was pulled in favor of an extra skater with around 1:40 left. Seconds later, Rantanen scored an easy goal.
Compher took a baseball swing to knock in a puck out of the air to give the Avalanche a 3-1 lead late in the second. Earlier in the period, Colorado capitalized on a cross-check penalty on Ian Cole as Barrie scored from the blue line. The Penguins entered 23 of 23 in killing penalties over their last eight contests.
Barrie staked the Avalanche to an early lead in the opening period when he scored his 50th career goal on a wrist shot over the glove of Murray. It lasted all of 5:35 before Ruhwedel's shot hit Varlamov in the right arm, got lost in his jersey for a moment and then rolled in off Varlamov's left skate.
Compher thought he scored late in the first, even raising his hands, but the official disallowed it when Sven Andrighetto made incidental contact with Murray near the goal.