Ankiel, whose career as a pitcher ended because of multiple injuries, has turned into a power hitter. He has hit five home runs with 14 RBI in 17 games since joining the Cardinals.
He helped push the Cardinals to within two games of division-leading Chicago in the National League Central.
Randy Flores (2-0) earned the win with two innings of scoreless relief.
Gary Majewski (0-2) took the loss.
Ankiel's homer came in the sixth and put the Cardinals in front, 7-4.
Pistorius testifies he didn't consciously pull trigger when he shot girlfriend
Pot vending machine to debut