Vettel was hobbled by a loss of KERS on his first Q3 lap and was 0.4 seconds adrift of Webber's provisional pole effort.
The system was successfully reset for Vettel's second run but he could not improve enough to depose Webber, who then improved his pole time to 1m30.915s.
The result was not only Webber's first pole of 2013, but the first time he had outqualified Vettel all year.
Nico Rosberg was 0.144s slower than team-mate Hamilton in sixth place.
Fernando Alonso was only eighth quickest, 0.3s off Massa and pushed back a further place by Nico Hulkenberg's flying Sauber.
Kimi Raikkonen again struggled for qualifying speed, lapping 0.319s slower than Grosjean as he ended up five places adrift.
Jenson Button's McLaren rounded off the top 10.
Q2 was extraordinarily close, with barely half a second covering second to 14th places.
Sergio Perez ended up on the wrong side of the cut-off in 11th, just ahead of Paul di Resta.
The Scot had a much better qualifying session than Force India team-mate Adrian Sutil, who picked up a gearbox-change penalty following his morning crash and then struggled for speed. He was only 17th fastest and was eliminated in Q1.
The main piece of Q1 drama was a bizarre fire on both rear brakes of Jean-Eric Vergne's Toro Rosso. The Frenchman had to park on the exit of the hairpin and the session was briefly red-flagged so marshals could deal with the fire safely.
That left Vergne 18th, while team-mate Daniel Ricciardo only managed two places higher as he trailed the Q2 pack.
Those dramas helped Williams to an encouraging 13th and 15th with Valtteri Bottas and Pastor Maldonado.
They were split by Esteban Gutierrez, whose Sauber fleetingly caught fire in the pit garage halfway through Q1. There was no damage and he was able to continue qualifying.
Marussia's Max Chilton produced the best qualifying performance of his F1 career so far to beat the Caterhams and his team-mate Jules Bianchi to 19th place.
Both Charles Pic and Bianchi have 10-place grid penalties for Korean GP incidents so should share the back row.