The series was tied at one game apiece, but the Pirates took a 2-1 series advantage with a win on Sunday.
After Carlos Beltran tied the game at three in the eighth with a solo home run, Pedro Alvarez and Russell Martin drove in two runs in the bottom of the eighth.
Jason Grilli the notched the first postseason save of his career, as the Bucs celebrated the win at home.
Beltran was the best player in the game on Sunday, going 2-for-3 with all three RBIs for the Cardinals. However, no one else could help St. Louis' offense, and the team came up just short.
The Pirates are now one win away from a trip to the NLCS, and from winning their first postseason series in more than three decades.
F - Pirates 5, Cardinals 3