Holliday's RBI double off Alberto Arias (2-1) tied it. He advanced to third on a wild pitch and Ryan Ludwick was intentionally walked before Ankiel's opposite-field hit helped the Cardinals win for the fourth time in five games.
Trever Miller (3-0) froze Michael Bourn on a called third strike with two men on to end the eighth and Ryan Franklin worked around a leadoff single by Kaz Matsui in the ninth for his 24th save in 26 chances.
Holliday was 4 for 4 and had an RBI single in the fourth, duplicating his four-hit game in Philadelphia a week ago in his St. Louis debut. He is batting .586 (17 for 29) with a homer and eight RBIs since joining the Cardinals in a trade from Oakland. He is the first Cardinal to hit in his first eight games with the team since Roger Maris in 1967, and he is the first Cardinal since 1954 to reach base safely two or more times in his first eight games.
Holliday is a .439 career hitter at 4-year-old Busch Stadium with six homers and 12 RBIs.
The Astros got three straight singles off Brad Thompson with two outs in the eighth, and Kata's third pinch-hit in his last seven at-bats put them ahead 3-2.
Mark DeRosa's 20th homer, and seventh in 11 games, tied it at 2 against Brian Moehler in the seventh. The Cardinals missed a chance to take the lead when Bourn, the center fielder, threw out Jason LaRue trying to score from second on Skip Schumaker's two-out hit off Wesley Wright.
Mitchell Boggs, recalled from Triple-A Memphis to take Todd Wellemeyer's spot in the rotation, had trouble qualifying for a decision just as in an earlier stint with the Cardinals. Boggs threw 99 pitches, 44 of them balls, while walking five and striking out five in five innings and left trailing 2-1.