Dumoulin (Giant-Alpecin) crossed the line in 4 hours, 9 minutes and 55 seconds to finish just two seconds ahead of Tour de France winner Froome (Sky).
Joaquin Rodriguez (Katusha) was in the mix at the finish and finished third, moving to second place overall, 57 seconds behind Dumoulin.
"I felt very good during the stage, unlike yesterday when I did not have the best day, so I wasn’t really expecting it. But the stage worked out surprisingly well," Dumoulin said.
"My tactic for the final climb was to attack on the flatter part and hang on on the steeper part. I could never have imagined that I could win a stage like this, but I’m in the form of my life.
"I’m really happy with the first week and my form, as I didn’t know exactly what to expect at this Vuelta. I’m proud to be back in the leader’s jersey now, and I will see day by day how it goes from here.
"We are not on the big climbs yet, but my climbing is improving and I’m climbing well."
Froome tried for the stage win in the final 500 metres of the stage but couldn't hold off a late charge by Dumoulin.
He remains more than a minute back in the overall standings in 8th place but more importantly sits among a cluster of pre race favourites, including Nairo Quintana and Alejandro Valverde (both Movistar) and Fabio Aru (Astana), as the general classification race begins to tighten.
"I'm not at all disappointed. Of course here I knew my condition wouldn't be the best after the Tour de France," Froome said.
"To be honest I am really happy with today. I didn't win the stage but Tom Dumoulin deserved it, he's in fantastic condition."
"I gave it everything. I did try and ride more conservatively at the bottom to try and save something for an effort at the top if I had the legs. More than anything I'm just happy that I was up there and didn't lose too much time today."
Former leader Esteban Chaves (Orica-GreenEDGE) struggled at the end of the climb and finished nearly a minute behind Dumoulin, losing the leader's red jersey and dropping to third overall.
Dumoulin and Chaves were involved in an early pileup nearly an hour into the 168.3km stage from Torrevieja to the Cumbre del Sol.
Valverde also got caught up in the early accident and briefly needed medical assistance before recovering to finish seventh. Quintana was sixth.
The repurcussions from the previous stage were also felt with winner Jasper Stuyven (Trek Factory Racing) not starting because of an injury sustained in the massive crash which claimed several riders.
Peter Sagan, who was controversially taken out by a neutral service motorbike near the end of Stage 8 also had to withdraw.
Next up for the Vuelta peloton is the 146.6km 10 stage from Valencia to Castellon, which is marked as one for the sprinters.