More French attacks followed but desperate Irish defence, and a couple of impressive catches by Rob Kearney, kept the visitors at bay.
But the French got their reward as another typically sweeping move was finished off by the recalled Harinordoquy in the 14th minute, although there was a hint of a forward pass by Julien Malzieu.
Beauxis added the conversion to put France 7-3 ahead.
O'Gara's penalty, straight after the restart, left only a point between the teams but France were controlling the game with the Irish living off scraps.
A tight forward drive into French territory yielded a chance to gave the Irish an undeserved lead in the 31st minute but O'Gara was off-target from 45 metres.
But Ireland were suddenly ahead on 34 minutes as Bowe's break put the French defence on the backfoot.
Paul O'Connell's quick pass kept the move going and the impressive Heaslip weaved his way past two challenges to charge over the French line.
O'Gara's conversion increased Ireland's lead to 13-7 as the home side held the initiative for the first time in the match.
If the French were rattled, they weren't showing it and a Sebastien Chabal charge had the Irish defence backpedalling a minute later.
On the stroke of half-time, Lionel Beauxis struck a drop-goal which cut the Irish lead to three points at the break.
Brian O'Driscoll touches down early in the second half in Saturday's game
The first score after the break went to the Irish as O'Driscoll brushed past Beauxis' poor tackle to score the kind of try which was been missing from the Irish captain's armoury in recent times.
O'Gara's conversion extended the Irish lead to 20-10 as the home side appeared to have seized the initiative.
But once again, French responded as Harinordoquy pounced on some scrappy Irish play to set up an attack finished off by Medard's try.
The French winger touched down after getting the luck of the bounce from Beauxis' chip over the home defence.
Beauxis missed the conversion but his second drop-goal of the day cut Ireland's lead to 20-18.
But just as the match threatened to slip away from Irish, they responded to strike the decisive blow.
A forwards drive saw the home side move deep into French territory and the attack was finished off by replacement D'Arcy sniping his way over the line to celebrate his return to the international stage.
O'Gara's conversion extended Ireland's lead to 27-18 but there was only a score between the teams when Beauxis landed a penalty four minutes from time.
At that stage, memories of Vincent Clerc's late try two years ago loomed large for Irish fans but O'Gara's immediate penalty eased home nerves.
Kearney; Bowe, B O'Driscoll (capt), P Wallace, Fitzgerald; O'Gara, O'Leary; Horan, Flannery, Hayes, O'Callaghan, O'Connell, Ferris, D Wallace, Heaslip.
R Best for Flannery (49), D'Arcy for Wallace (63), Murphy for Kearney (80), Leamy for Ferris (76)
: Court, O'Kelly, Stringer.
Poitrenaud; Malzieu, Fritz, Jauzion, Medard; Beauxis, Tillous-Borde; Faure, Szarzewski, Lecouls, Chabal, Nallet; Dusautoir, Ouedraogo, Harinordoquy.
Kayser for Szarzewski (58), Mas for Lecouls (40), Millo-Chluski for Chabal (62), Picamoles for Harinordoquy (71), Parra for Tillous-Borde (68), Baby for Fritz (80), Heymans for Poitrenaud (79).
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.