Biarritz No8 Imanol Harinordoquoy led the charge for the home side as they overcame a 10 point deficit in the first -half to dominate the second period and thoroughly deserve to open up the title chase.
Wales were chasing a record equalling ninth successive Six Nations triumph and looked to be in control for much of the first half as Stephen Jones landed two penalties and also converted a great try from full back Lee Byrne.
But a spirited revival from the French, with a try on the stroke of half-time from flanker Thierry Dusautoir, levelled the scores and it fell to Toulouse wing Cedric Heymans to complete the revival with a corner try that gave the French the lead for the first time after the break.
Then emergency goalkicker Morgan Parra held his nerve to land to kick a crucial penalty after a number of misses to leave Wales chasing the game. James Hook, who took over from Stephen Jones, kicked a penalty with his first attempt to set up a great finish.
Twice Dafydd Jones got within a few inches of the French line, but Wales couldn't pull the game out of the fire at the death.
THIS IS WHAT THEY SAID
Iamol Harinordoquoy: "We won the game on the spirit of our defence. We showed another face of this team tonight. We really wanted to win to show what we can do.
"There was a lot of pressure on our coach after two not very good performances and we wanted to prove a point.
"The championship is wide open again now."
Tom Shanklin: "This is a biter pill to swallow for us. The Grand Slam has gone and we are pretty down about that. But there is still a championship to play for .
"We played into their hands a bit and that try at the end of the first-half didn't help us. We needed to play more in their half."
Stephen Jones: "The French deserve a lot of credit. They fought the contact area very well and their defensive line was very organised.
"They put us under a lot of pressure. It's very disappointing for us because we made too many mistakes.
"It's very frustrating and we are bitterly disappointed, but there are two games left in the championship. They will both be difficult, and Rome will be a big challenge for us, but we have to get back to winning ways."
Warren Gatland: "We made too many mistakes. When we were 13-3 ahead we needed to be a bit more accurate going into half-time.
"The sequence leading up to their try before half-time had four mistakes in it. We still had a chance to win it at the end, and the players were disappointed they didn't get a penalty from the last line-out for interference, but in the end we weren't good enough.
"They were winning the collisions in the first half and that was disappointing for me. Evidently they were more desperate than we were to win.
"Now we have to think about the Italian game and getting some points on the board. so that we can still win the title on points difference."