"I was able to fight, to change a little bit the dynamic of the match," Nadal said. "The players who are in the top position of the rankings, it's because they are able to win when things are not going well."
Fognini started fluently as he broke and led 3-0. He was soon leading 5-1 but failed to serve out and had to break Nadal again with a superb cross-court return to clinch the set.
Fognini again ran up a 3-0 lead in the second and was serving with a lead of 4-2 before Nadal seized control.
It was the third straight victory over Fognini for Nadal, who next plays fourth-seeded Tomas Berdych of the Czech Republic.
Berdych scored a 7-5, 6-2 win over John Isner to improve his record to 3-2 against the American.
In other women's matches, former Wimbledon champion Petra Kvitova beat local favorite Li Na 4-6, 6-2, 6-4 to set up a semifinal with Jelena Jankovic. Jankovic also came from a set down to beat Lucie Safarova of the Czech Republic 6-7 (3), 6-4, 6-4.