Wing Alex Cuthbert was the try-scoring hero for the hosts with a fine individual score on 21 minutes after man of the match Dan Lydiate and Lions lock Alun Wyn Jones had secured turnover ball midway inside the French half.
Cuthbert followed up his solo effort against Italy last week by slicing through three tackles to send a capacity crowd wild in the Welsh capital.
Leigh Halfpenny added the extras and then slotted a penalty shortly after half an hour to hand Wales a 10-3 lead as they looked to provide a fitting tribute to Lions legend Mervyn Davies who lost his battle with cancer yesterday.
The Lions full back was off target with another three-pointer on the stoke of half-time, though, and Lionel Beauxis narrowed the gap to just four points four minutes after the break after Wales skipper Sam Warburton had succumbed to a shoulder injury at the interval.
Nervous times followed for a fanatical Welsh following but a second Halfpenny penalty calmed fears on 53 minutes.
Dimitri Yachvilli struck back for the French with seven minutes remaining, though, as France again closed to within an unconverted try of spoiling the party.
But just as the pessimists began to worry about a Welsh collapse, Halfpenny stepped up for a third penalty that won it for Wales two minutes later.
Gatland's men hung on to possession for much of the closing stages, with France never managing to break out of their own half as they looked for the converted try that would have stolen a draw and stopped Welsh celebrations.