The game was tied 2-2 in the fifth inning when Jon Jay led off with a single against Nationals starter Tanner Roark and Beltran followed by powering a 3-1 pitch into the Cardinals' bullpen.
Adam Wainwright (18-9) allowed three runs on seven hits over seven innings to collect the win, walking none and striking out five.
Randy Choate, Carlos Martinez and Kevin Siegrist combined for 1 1/3 scoreless relief innings and Trevor Rosenthal recorded his first save as National League Central-leading St. Louis maintained a two-game lead over second-place Pittsburgh and Cincinnati.
The Cards reduced their magic number for clinching the division to four.
The Nationals, meanwhile, saw their playoff hopes extinguished in dropping the first of a three-game series.
Roark (7-1) was touched for four runs on nine hits over five full innings.
Jayson Werth smacked a two-run, first-inning homer in the loss.