Meanwhile, Britain's Cal Crutchlow picked up a career-best second place at a damp Le Mans.
Repsol Honda rider Pedrosa only started the race from sixth on the grid, but made a good start to get away cleanly with the front runners in the tricky conditions.
The Spaniard worked his way up to second and enjoyed a good battle with the Ducati of Andrea Dovizioso, eventually making a decisive move to pull away for his second victory of 2013, which moves him six points clear of team-mate Marc Marquez.
Crutchlow, meanwhile, produced a mature ride at the end of a week which has seen his future at the Tech 3 Yamaha team thrown into doubt.
The Coventry-rider was also racing with a fracture to his shin following a big fall in Saturday practice, but he bided his time to climb his way up from fifth in the early stages and work his way past Jorge Lorenzo, Valentino Rossi and Dovizioso to claim second place.
Marquez, enjoying a sensational rookie season, finished third after a superb recovery from a woeful start.
Marquez started on pole but had dropped to eighth by the end of lap one as he struggled badly with the wet conditions.
The youngster survived two scary moments during the opening laps but as the track dried his pace improved, and he eventually took third from Dovizioso on the penultimate lap.
But it was a miserable day for Lorenzo, the reigning world champion could not run with Dovizioso and Pedrosa early on and slowly dropped back to an eventual seventh. Team-mate Rossi was only 12th after crashing out of fourth position.
Nicky Hayden was fifth on the second factory Ducati, with Alvaro Bautista sixth.
Michele Pirro was eighth, with Bradley Smith claiming his best result so far in ninth and Stefan Bradl, another to recover from a fall, rounding out the top 10.
There was also good news for Britain in the Moto2 race as Scott Redding produced an assured ride to take his first win in the class.
Crutchlow, meanwhile, was delighted with his performance at the end of a trying week both on and off the track.
"I'm really happy to get my best ever result in MotoGP and the whole team did an incredible job and deserves this result," he said.
"We showed our fast pace in the dry, we showed our pace in the wet and I think everybody is aware we are not here through luck.
"It's even better and more important because this is the home race for Tech 3 and Monster Energy sponsors the event. So to be the best and only Yamaha on the podium feels really good.
"I'm really happy with how things went, especially after the crash yesterday [Saturday]. The wet track obviously put less stress on my body but it was tough riding injured in such tough conditions.
"From now on I just hope we can be injury-free and go to Mugello to put on the same show as we did here today [Sunday]."
Crutchlow's team boss Herve Poncharal hinted this week that the Briton could lose his place at the end of the season due to Yamaha's interest in Moto2 rider Pol Espargaro.
Crutchlow's contract is up at the end of the year meaning his position is precarious, but he did his future prospects the power of good with today's display and earned high praise from his team manager.
"It has not been an easy weekend with the weather conditions and Cal's big crash from yesterday, and we even had some doubt that he would be able to participate in qualifying but he did a great job," said Poncharal.
"It was easy to make a mistake in those very difficult conditions but the way he cut through the field gave Tech 3 fans a lot to cheer in the race.
"Cal is doing an amazing job this season and today [Sunday] once again he showed what a top talent he is."