Gyorko's 423-foot shot in the first extended the Cardinals' home run streak to 15 games, the longest active streak in the majors, and made it 2-0 after just two batters.
Weaver (1-1) gave up one run and four hits in a career-high six innings in his home debut for the Cardinals. Five of his seven strikeouts were looking.
Cardinals center fielder Randal Grichuk made a diving catch on a sinking drive by Stephen Vogt to end the fifth, and Jhonny Peralta made a sprawling stop at third base and threw out Khris Davis to start the sixth.
Seung Hwan Oh got the last three outs for his 13th save.
Ross Detwiler (1-3) gave up three runs and six hits while striking out six in 5 1/3 innings.