The four-time world champion led the way, outpacing Raikkonen by 0.059 seconds with another Finn, Valtteri Bottas of Mercedes, third fastest with less than tenth of a second separating the top three.
Britain's Lewis Hamilton was fourth fastest, the first time Mercedes had failed to have car on the front row for 31 races.
It was Vettel's first pole this year, his second for Ferrari and the 47th of his career – and, perhaps more significantly, Ferrari's first front row lockout for 127 races since the 2008 French Grand Prix.
A delighted Vettel screamed "yes, yes, yes" as the news of his pole was relayed to him on his slowdown lap.
Hamilton, struggling and disappointed, was more than half a second adrift.
Vettel's success also brought to an end Mercedes' run of 18 straight pole positions dating back to last year's Monaco Grand Prix.
"It's hard to understand how we're going to make it better," said Raikkonen.
Australian Daniel Ricciardo was fifth for Red Bull ahead of Brazilian Felipe Massa of Williams, Dutch teenager Max Verstappen in the second Red Bull and German Nico Hulkenberg of Renault.
Mexican Sergio Perez was ninth for Force India ahead of his team-mate Frenchman Esteban Ocon.