Palace had twice led, firstly through Johannes Ertl's header and then from a brilliant free kick from Darren Ambrose. In between James Collins scored for Villa.
But late on the ball went out of play seemingly off a Villa player but a corner was given and the goal was scored by Petrov.
Neil Warnock was furious and Villa had gotten out of jail.
It really was an excellent cup tie and now they have to do it again at Villa Park.
Place have League action first though and must concentrate on getting away from the bottom three.