The 24-year-old beat Marc Soler with a late burst in the final ascent, a 16.5-km effort at an average gradient of 6.2%.
The race favourites stayed quiet in the final ascent, reserving their energy for Sunday’s 12th stage, which ends at the top of the feared Angliru – a 12.4-km ascent at 9.9% with the last seven kilometres averaging a gradient of 13% and featuring a section above 20%.
Primoz Roglic retained the overall leader’s red jersey, tied on time with Richard Carapaz with Dan Martin in third place, 25 seconds behind.
Enric Mas is still Movistar’s best-placed rider in fifth place, 1:54 off the pace, 50 seconds ahead of team mate Soler. Gaudu climbed up to 12th, 5:02 behind Roglic.