In front of a raucous crowd at the Stade de France, Les Bleus took the lead on the night midway through the first half through Mamadou Sakho and levelled the tie on aggregate when Karim Benzema netted from an offside position on 34 minutes.
That strike came shortly after the Real Madrid man had seen a perfectly good goal disallowed, and the controversy continued as Ukraine defender Yevhen Kacheridi was sent off early in the second period.
France made their one-man advantage count as an Oleg Gusev own-goal put them ahead in the tie for the first time in the 72nd minute and Didier Deschamps' side saw out the rest of the game to win 3-2 on aggregate.
"Four days ago, we were in a bad position but the players were fantastic tonight," Deschamps told French television. He added: "I didn't have doubts but we played a huge match and this qualification is very important for French football.
"It's a bit of a tradition that when French teams have their backs against the wall, they peform and we had a lot of heart and determination today. "Now we've qualified, we're capable of some great things."
As expected, Deschamps rang the changes, making five in all to his starting line-up from Friday's 2-0 loss in Kiev, with Raphael Varane, Sakho, Yohan Cabaye, Mathieu Valbuena and Benzema coming in.
For Ukraine, there were three changes, notably in defence, where the banned Oleksandr Kucher and Artem Fedetskiy were replaced by Yaroslav Rakitskiy and Vitaliy Mandziuk respectively.
The visitors must have been braced for a backs-to-the-wall job, but they could scarcely have expected France to play with such a high level of intensity in the first half.
Ukraine were pinned back from kick-off, and goalkeeper Andriy Pyatov turned a Valbuena shot around the post inside three minutes before Paul Pogba headed a Valbuena corner over the bar.
And just as the away side thought they had taken some of the early sting out of the contest, their defence - which had gone eight successive matches without conceding before this game - was finally undone in the 22nd minute.
When a Valbuena set-piece delivery from the right fell to Franck Ribery on the edge of the box, the Bayern Munich man's shot was blocked by Pyatov, but Sakho was on hand to convert the rebound from a tight angle, the Liverpool defender netting his first goal at international level.
France's hope turned to genuine belief, and the home fans rose to their feet as a glorious shooting opportunity fell to Pogba on the edge of the box. However, the young midfielder could only blaze his effort over the bar.
Controversy was just around the corner, as Benzema bundled a low Ribery cross from the left into the net at the back post, only for the offside flag to cut short his joy.
It was the wrong decision by the Slovenian officials but remarkably another error on their part allowed France to level the tie on aggregate.
A scramble in the Ukrainian box saw the ball come off Valbuena and fall to Benzema barely six yards out. This time, he was offside but the assistant's flag stayed down as he gleefully fired home.
Ukraine knew that an away goal would swing the tie right back in their favour, but they scarcely produced an attempt on target in the opening half and their hopes were dealt another massive blow just after the restart as Khacheridi, who had already been cautioned late in the first half, was booked again for a late challenge on Ribery.
Down to 10 men, Ukraine remained a threat and Roman Bezus just missed the target from long range, but France continued to press relentlessly in search of a third goal and they got their reward with under 20 minutes remaining.
When a Patrice Evra shot was pushed out by Pyatov, Ribery returned the ball across the face of goal and unfortunate substitute Gusev turned it into his own net under pressure from Sakho.
Pyatov saved from substitute Olivier Giroud's header as France sought to put the final outcome beyond doubt, but they held on to secure their ticket to Brazil.
Photos: Swara Bhaskar, Sonali Kulkarni at Jagran Film Festival awards
Pics: Shahid Kapoor's transformation from chocolate boy to hottie
Photos: Kareena Kapoor Khan and Aamir Khan at Mumbai airport
Photos: SRK, wife Gauri, Aishwarya Rai, Shweta Bachchan at Vogue Awards
Photos: Harbhajan Singh-Geeta Basra's TV outing with daughter Hinaya