The Italian 10th seed - runner-up at Roland Garros in 2012 - made a quick start to the quarter-final clash, but dropped seven consecutive service games on her way out of the competition.
Victory sees Germany's Petkovic, who contemplated retiring after losing in qualifying last year, contest her first grand slam semi-final, where she will face Simona Halep.
After an almost three-hour delay due to rain, Petkovic was slow to get going, and Errani took full advantage by pouncing to open up a two-game lead.
However, the German hit back by storming to the next six games on the bounce in blustery conditions on Court Philippe Chatrier.
Errani continued to struggle and stumble on her own serve in the second, as her tally of conceded service games continued to climb at an alarming rate.
Petkovic was initially unable to capitalise as she too lost two games on her own serve, but after holding to go 3-2 in front, the world number 27 was well and truly in the driving seat against her below-par opponent.
Wins in the next two games put Petkovic on the brink of victory, and after forcing the next to deuce, the 26-year-old saw out the match with relative comfort.
Afterwards, Errani conceded she was simply not able to get going in the match, with fatigue playing a part in her defeat.
"I think she (Petkovic) played a good match. The problem was not that, it was me. (I had) no power, no energy. Like that, it's tough to play tennis.
"I was very, very tired. I didn't have mentally (enough) energy.
"I don't know why I was dead. I didn't have power in my legs. I don't know why."