With the rain belting down in Eibar, the Colombian broke free of a seven-man group of GC contenders right at the end to take the stage win by two seconds from Henao.
Quintana is now just six seconds behind his countryman overall with Richie Porte (Team Sky) joint third with Alberto Contador (Saxo-Tinkoff) and Simon Spilak (Katusha) 10 seconds back after they all finished in the lead group.
AG2R La Mondiale duo Carlos Alberto Betancur Gomez (21 seconds back in GC) and Jean-Christophe Peraud (26 seconds back) also finished in the leading group but Tejay van Garderen (BMC) and Andrew Talansky (Garmin-Sharp) both lost time.
Henao finished the stage in third place to keep the overall lead.
"It's a very important win for me because this is one of the biggest races in the World Tour," Quintana said.
"It's a massive joy for me and a huge boost of confidence for the future, because this climb has such a rich history, and the weather conditions all day, with cold and rain, make it really special.
"The rain took much energy out of us and none knew how their rivals were, hence the lack of attacks. I kept my mind cold in the Arrate climb to avoid any timing errors like yesterday, and only took risks into the downhill.
"I knew the finale, because we went into the recon and we saw that the final meters were the key for the result. I took chances there and it paid off."
Peter Velits (Omega Pharma-Quick Step), Eduard Vorganov (Katusha), Matteo Montaguti (Ag2r La Mondiale), Daniele Ratto (Cannondale), and Rein Taramae (Cofidis) had attacked with just under 100km left in the stage.
Velits, Ratto and Montaguti lasted the longest but were finally swallowed up in the final few kilometres.
There will be more defending to do on Friday though with the riders facing 10 rated climbs in a 166km stage from Eibar to Beasain.
"We still have two stages left; when we started the race, they seemed decisive, and it looks so now," Quintana added.
"I know the route and it suits me well, with some climbing too - I don't really do bad in the flat.
"It will be hard, because we will have to fight with the likes of Sergio, Contador and Porte, those that everyone is naming, but also with riders like Spilak, which have shown themselves to be strong this week."