McGowan (2-1) pitched three-hit ball for seven innings, allowing one run and striking out five.
It was just the fourth win in 13 games for Toronto, which prevented the Pirates from completing their first series sweep of the season.
Pirates manager Clint Hurdle and first base coach Rick Sofield were ejected by plate umpire Greg Gibson at the end of the fourth inning for arguing a called third strike on Jordy Mercer. The strikeout stranded two runners and ended the inning.
Rasmus connected in the second inning for his fourth career slam. He also doubled and singled.
The Blue Jays held on to this early lead. Toronto wasted a 5-3, ninth-inning edge in the series opener and a 5-0, fourth-inning advantage on Saturday night.
Josh Harrison hit two triples for the Pirates.
Edinson Volquez (1-3) gave up six runs and seven hits in five innings. He also allowed six earned runs in his last outing April 21 against St. Louis.
Volquez pitched himself into a jam in the second inning before Rasmus stepped to the plate, issuing walks to Edwin Encarnacion and Juan Francisco to start the inning. Brett Lawrie reached on an infield single to load the bases with no outs.
Rasmus hit a full-count curveball about 10 rows deep in the right-field seats for his seventh home run of the season, giving the Blue Jays a 4-1 lead.
The slam negated an early lead the Pirates built on Neil Walker's groundout, scoring Harrison after his triple.
Harrison also tripled in the eighth inning and scored on an Andrew McCutchen sacrifice fly.
Toronto's Jose Bautista walked in the fifth inning to reach base in his 31st consecutive game, the longest active streak in the majors. But he went hitless, snapping a career-best 13-game hitting streak.
Cabrera had three hits, and extended Toronto's lead to 6-1 with a two-run homer off Volquez in the fifth inning. Rasmus scored another run in the eighth on an RBI single by pinch-hitter Dioner Navarro.
NOTES: Highly regarded Blue Jays RHP Marcus Stroman made his big league debut, allowing one earned run and one hit while getting two outs. The Blue Jays selected the 23-year-old Stroman Triple-A Buffalo and optioned OF Anthony Gose. ... The Pirates plan to recall LHP Jeff Locke to start against San Francisco on Monday night. An All-Star last year, Locke struggled in the second half of 2013 and did not make the Pirates' opening day roster. ... J.A. Happ (0-0, 4.15) is scheduled to pitch for the Blue Jays at Philadelphia on Monday night.