Steve Mason also had 29 saves and Wayne Simmonds scored for the Flyers, who had their four-game winning streak stopped.
Philadelphia won the first three on this six-game road trip, scoring four goals in each victory but was stymied by strong goaltending by Colorado.
Varlamov had several good stops throughout the game, including one on Scott Hartnell with 3:24 left. It was the second time Varlamov made a big save on the big forward.
Mason came off for an extra skater with 1:29 left and Philadelphia had several chances but couldn't get the equalizer.
Colorado took a 1-0 lead midway through the first when McGinn, trailing the play after a Philadelphia turnover, scored off Matt Duchene's rebound. It was McGinn's eighth of the season and second in as many games.
The Flyers had a great chance to tie it on a power play later in the first. Steve Downie got behind the Avalanche defense and broke in alone on Varlamov, but the goalie made a pad save to preserve the lead.
Varlamov denied Hartnell on a chance early in the second, and then laid out to deny Downie again on a power play with 12:54 left in the middle period.
Two minutes later, O'Reilly made it 2-0 when his shot went off Mason and over his head into the net. It was his 14th of the season.
The Flyers broke through when Simmonds slid across the front of the crease and tipped in a shot from defenseman Andrej Meszaros with 6:12 left in the second. It was Simmonds' 13th goal of the season.
NOTES: Philadelphia LW Michael Raffl left the game with a concussion after he was hit along the boards by Gabriel Landeskog early in the second period. ... Colorado D Ryan Wilson was a late scratch from the lineup. ... Philadelphia C Vincent Lecavalier needs eight goals to reach 400 for his career. ... Avalanche C Paul Stastny was selected to the U.S. Olympic team Wednesday.