The Canucks had scored one goal in their previous two games, home losses to the Dallas Stars and New Jersey Devils.
"The last two games before this we were hurting for goals," said Horvat, who scored with 3:21 left in the third period and had three assists. "To finally get rewarded for our chances felt great."
Jacob Markstrom made 37 saves, and Baertschi had three assists for the Canucks (7-4-2).
"If [Markstrom] wasn't as sharp as he was we weren't going to win," Vancouver coach Travis Green said.
The same was true of his young top line of Boeser, Baertschi (25), and Horvat (22).
"As I keep playing with Bo and Sven we keep gaining chemistry. I feel more confident each game," Boeser said. "We play quick and we create turnovers. That's how we create chances."
Jake Guentzel scored, and Murray made 17 saves for the Penguins (8-6-2), who went 1-3-1 on their season-high five-game road trip after starting the season 7-3-1.