Ankiel had a pair of two-out, run-scoring singles, one in the second inning to push the Cardinals to a 2-0 lead and another in the seventh for a 3-1 edge.
Pineiro (4-0) went 6 2-3 innings, allowing seven hits and a pair of runs while walking none. He also won his first four decisions for Seattle in 2001.
Ryan Franklin worked the ninth for his sixth save in as many chances.
The crowd of 16,379 was the fourth turnout of less than 20,000 in seven games at Turner Field this season.
Pineiro's lone strikeout came on his final pitch, and it was a big one. The right-hander whiffed Brandon Jones with the potential tying run at second base before reliever Chris Perez struck out David Ross to end the threat.
St. Louis (14-6) assured itself of keeping at least a share of the NL's best record, after coming into the night tied with Los Angeles. The Dodgers played later Monday at San Francisco.
Pineiro also had a hand in the offense, drawing a walk from Peter Moylan and coming around to score what proved to be a crucial run on Ankiel's hit in the seventh.
The run-challenged Braves have struggled to produce offense with a lineup that's missing Brian McCann and Garret Anderson, both on the disabled list. Since starting the season 5-1, they have scored three runs or fewer in nine of their last 13 games.
No one has been hurt more than Jair Jurrjens (2-2). He's 0-2 over his last three starts, despite giving up just three runs in 20 1-3 innings. He bounced back from a shaky start to go six solid innings against the Cardinals, allowing two runs and six hits.
Casey Kotchman, taking over the cleanup spot for McCann, had three hits but flied out to end the eighth with the bases loaded.
St. Louis strung together three hits off Jurrjens in the first inning, including Chris Duncan's RBI single with two outs. Working a little too carefully in the second, Jurrjens walked two and yielded another run when Ankiel drove a single to right-center.
Kotchman led off the Braves' second with a double that was barely fair down the first-base line. He came home on Ross' two-out double to center.
Kotchman helped produce another run in the seventh, doubling into the right-field corner after Chipper Jones led off with a single. Jeff Francoeur drove in Jones with a sacrifice fly, but Kotchman was stranded at second when Jones and Ross struck out.
Notes: St. Louis C Yadier Molina extended his hitting streak to 11 games with a single in the third. ... The Cardinals are in a stretch of 20 straight games without an off day. ... Jurrjens threw 68 pitches over the first three innings but needed only 31 to get through the next three. ... Cardinals RHP Blaine Boyer returned to Atlanta for the first time since being traded by his hometown team on April 20. He didn't get in the game.