The 23-year-old Movistar rider finished second in the final, hilly individual 24-kilometre time trial at Beasain, 17 seconds down on world champion Tony Martin which was enough for Quintana to claim the biggest win of his career.
Paris-Nice winner Porte, victorious on Friday's mountain stage, was a below-expectations fourth in the time trial, 40 seconds behind German Martin, and had to settle for second overall, 23 seconds adrift of Quintana in the final standings.
Porte's Sky team mate and former race leader Sergio Luis Henao of Colombia dropped to third at 34 seconds.
"I've been looking for a big win like this since Paris-Nice," Quintana told reporters. "I don't know if you can call this (victory) a surprise.
"This time trial definitely suited me, with so many hilly sections, and I've been gambling on a good performance here all week.
When a time trial is not flat, then I can be up there with the big names in races like this one."
Having beaten Sky's two favourites, while Spain's top contender Alberto Contador faded badly to finish 10th in the time trial, Quintana said he had bigger goals.
"I've got to go on learning, but my idea is to fight for a Grand Tour in the future."
In 2010, Quintana took the Tour de L'Avenir, cycling's top stage race for young riders and was snapped up by leading Spanish squad Movistar in 2012.
Last year, he inflicted a rare defeat on the all-powerful Sky in the hardest Alpine stage of the Criterium du Dauphine, the key warm-up race for the Tour de France.
Victorious in a mountain stage of the Tour of Catalonia two weeks ago, Quintana moved into second overall in the Basque Country race with a win on the Arrate summit on Thursday.
Martin repeated his 2011 victory in the Basque Country's final stage on a rain-soaked, technical course, but said he had come looking for a bigger prize.
"The week was not perfect for me, I crashed on the first stage and I'd wanted to go for the overall victory," the Omega Pharma-Quick Step rider told reporters.
"It was a dangerous time trial, with the bad weather and a lot of corners, so I really hope that in the Basque Country in the future there will be a better one."
- Sports & Recreation