The Tour de France runner-up attacked with 5.5 kilometres remaining on the climb to the Col de l'Ospedale, leaving team mate and then race leader Porte trailing in his wake.
Sky, who have been criticised for their defensive tactics, did not just sit and wait this time as Froome and Porte attacked one after another on the 14.1-km ascent.
Paris-Nice champion Porte, who had snatched the yellow jersey after his victory in Saturday's 7-km time trial, counter attacked and managed to take second place on the day, 30 seconds behind Froome. Dutch Bauke Mollema was third, 45 seconds off the pace.
Porte finished second overall, 32 seconds adrift of Froome.
"It was more or less what we had planned," Froome said.
"The idea was to control the race all day. It was a huge task and we really put the pressure on the others. I did not plan to attack in the climb but there was a gap between Richie and me and I felt I could go, so I went.
"This race helped me see how I could trust my team with the Tour de France in mind."
Froome has made the Tour his main objective after playing second fiddle to Bradley Wiggins in 2012.
He has shown that he has what it takes to lead the British outfit by winning the Tour of Oman as well as finishing second in the Tirreno-Adriatico.
Porte, who won Saturday's individual time trial to hold the race lead, said he had made an agreement with his team mate before the stage.
"The deal between Chris and I this morning was 'if you've got good legs, you go and if I have good legs, I'm the one who goes'.
"Then when we were in the final climb there was a small gap and nobody seemed to react so he was in the situation in which he had to continue."
Last year's winner Cadel Evans was dropped on the final climb with 10 km remaining and finished 14:56 off the pace.
American Tejay van Garderen, his BMC team mate, also struggled to respond to Team Sky's pace and was third overall, 54 seconds adrift.
Luxembourg's Andy Schleck, who has been in terrible form since crashing out of the Criterium du Dauphine last June, was part of an early break but was reined in by the peloton before the final ascent and crossed the line 21:57 behind Froome.
The peloton returns to Corsica in three months for the start of the Tour de France on June 29 from Porto Vecchio.