Geoghegan Hart, looking to deliver a second consecutive stage win for the Ineos Grenadiers after Geraint Thomas' opportunistic victory on Thursday, launched his move 350m from the line on an uphill sprint in Le Sappey-en-Chartreuse.
But Valverde would come around him metres before the line, with the wily veteran having held back while last year's Giro d'Italia winner ran out of gas at the last on Friday.
"I'm super happy to win at 41," Valverde said.
"First of all, I have to thank my team who have worked incredibly all week. For the final part, Superman Lopez said to me 'shall I pull', and I said okay. To be honest I have to thank him because he did an incredible job.
"(Geoghegan Hart) opened up really strongly, and I saw Thomas was gapped from him, so I couldn't hesitate, I had to go. I tried to keep it steady at first but when I saw the barriers I just went all-out."
Porte was part of the select group that came home just behind, all awarded the same time, and that saw him move up in the general classification, while fellow Australian Jack Haig rose to eighth. Porte is 15 seconds behind the leader.