It was the second pole in a row and 38th overall for the German, who finished third at the season-opening Australian GP last week after having trouble with his tires. Vettel took top spot on the grid by almost a second, causing him to scream "Yes!" in celebration when told by his team.
"I'm a bit surprised by the gap. I had a decent lap and was very happy, obviously," Vettel said. "It was quite tricky because some parts of the track were still wet and others were dry. Overall, a very good session.
"It will be a long race and difficult to know the true pace. Managing the tires will be crucial, and we go from there. We know the pace is there, so hopefully we can get to the checkered flag in the same position."
Australian GP winner Kimi Raikkonen's day went from bad to worse after he could only qualify seventh and was later penalized three spots for impeding Force India's Adrian Sutil. Last year at this race, the Lotus driver was relegated five spots for making an unscheduled gear box change.
Raikonen complained to his team over the radio during the third practice session that he was unhappy with his car's setup, telling them "I don't understand how the car can change so much."
"We weren't quick enough on the intermediates (tires), so I don't think we could have found much more time in the wet today," Raikkonen said. "For sure I wanted more, but it is what it is and I hope we'll do better on Sunday. It's obviously disappointing to lose three places on the grid, but we'll have to see what happens in the race."
Massa struggled for most of last year but has now qualified ahead of Alonso, his more famous teammate who has twice won the F1 title, for the fourth straight race.
"I think it was a good qualifying for us," said Massa, who only had two podium finishes in 2012. "We took the right decision to change tires and managed to put a good lap together as well."
Sunday's race is expected to be held in wet and humid conditions, similar to when Alonso won in Malaysia last year after Sergio Perez ran off the track just as he was attempting to pass the Spaniard following a 51-minute delay for rain.
Tire management will also be crucial with teams still struggling to understand how to get the most out of the new Pirellis, which are designed to degrade faster than last year's version in order to push teams to pit more often.
"For tomorrow we expect some rain around, so we have to be ready for any changes," Alonso said. "To do an extra lap on the wrong tires can cost you a lot of time than on other circuits. We have to be spot-on in the decisions tomorrow. We need to concentrate."
Lewis Hamilton extended his promising start since switching to Mercedes from McLaren during the off-season. After a fifth-place finish in Melbourne, the Briton qualified fourth fastest Saturday despite struggling in practice to twice finish ninth.
"I'm pretty happy with fourth place considering the conditions today," he said. "It's the second race on the second row for me and there are lots of positives to take out of the weekend so far. Our long-run pace looked pretty good compared to the other teams, so I'm hoping for dry conditions tomorrow."
McLaren's early season troubles show no signs of easing, although team principal Martin Whitmarsh said there are signs the new car is improving.
Jenson Button, the 2009 F1 champion, qualified eighth after complaining his car was oversteering, while Perez came 10th. McLaren's car has yet to perform to expectations, prompting Perez to suggest using last year's vehicle that won the final two races of the 2012 season.
"I don't think we can really expect to qualify any better than eighth right now," Button said. "But having said that, to be just two-tenths off the guy who won last weekend's Australian Grand Prix can't be too bad."
The circuit was hit by afternoon showers during qualifying but the rain stopped as the final session began. The worst of the showers came in the second session, affecting several drivers who were challenging to make the top 10.
Raikkonen's teammate, Romain Grosjean, got out of his car and walked away with several minutes left in the second session despite needing to overtake Perez to advance to the last part of qualifying.
"We should have easily had both cars in the top 10, but unfortunately the skies opened at just the wrong time for me," the Frenchman said. "It's a shame but there's a long race ahead of us tomorrow, and we now have extra sets of fresh dry tires in our pocket so hopefully we can use them well."
Force India driver Paul di Resta also looked set to reach the final session until he spun out on the wet track.