Greg Holland entered to close it out and made things interesting.
Oscar Tavares led off with a grounder toward second base that Omar Infante fielded deep in the hole and threw awkwardly to first base. Umpire Dan Iassogna initially ruled the throw beat Tavares to the bag, but a video review showed that he was clearly safe.
The Royals took the first two games of the four-game, two-city series at Busch Stadium, and then lost 5-2 in 11 innings on Wednesday night before taking the series finale.
Kansas City improved to 6-2 against National League clubs this season, while its slumping cross-state rivals lost for the seventh time in their past eight games.
The game was expected to be a showdown between two of the game's bright young pitchers in Ventura, with his 100 mph fastball, and Wacha, who emerged for St. Louis last season.
Neither of them disappointed.
Wacha only allowed two hits through the first five innings before Alcides Escobar started the Royals' rally with a double in the sixth. Nori Aoki followed with an RBI double and Eric Hosmer guided a single through a drawn-in infield to knot the game 2-all.
Salvador Perez, who had been in a 2-for-24 slump at home, followed with a go-ahead single.
Ventura left two runners aboard in the first inning and a runner on third base in each of the next three innings. Alex Gordon then helped him out of the fifth, when he threw out Yadier Molina trying to stretch a single into a double with a strong throw from left field.
The call was confirmed after a review that lasted 3 minutes, 30 seconds.
The fact that Aoki had a part in the Royals' sixth-inning rally was perhaps fitting.
The outfielder was leading off in the first inning when he took a pitch low and inside. He was still leaning slightly over the plate when Molina tried to return the ball to Wacha, and the throw instead ricocheted hard off Aoki's helmet and toward the third-base dugout.
Aoki crumpled into a heap for several minutes before resuming his at-bat. He later grounded out, but hurt the Cardinals with his double during the Royals' decisive rally.
Cardinals 2B Kolten Wong left in the fifth inning with soreness in his left shoulder, which he hurt diving for a ball Tuesday night in St. Louis. Daniel Descalso replaced him. ... Royals RHP Jeremy Guthrie starts a four-game series against the Yankees on Friday night. Cardinals RHP Lance Lynn will start for St. Louis to open its three-game set in Toronto.
Copyright by STATS LLC and The Associated Press
KANSAS CITY, MO - JUNE 5: Yordano Ventura #30 of the Kansas City Royals throws in the first inning against the...