Hamilton blew away the field seven days ago at Silverstone ahead of his own home race, but following practice at the Nurburgring appeared to have little hope of even being on the front row given the issues he had been experiencing with his Mercedes, notably with the rear.
But when it mattered most Hamilton, along with his team, pulled a rabbit out of the hat with a superb lap of one minute 29.398secs, pipping Red Bull's triple world champion Vettel by a tenth of a second.
All the talk ahead of this event had focused on Pirelli's tyres in the wake of the debacle that unfolded over the course of the British Grand Prix weekend.
A series of blowouts had prompted safety fears and a threatened boycott from the Grand Prix Drivers' Association should a repeat occur of the scenes witnessed at Silverstone where lives were put on the line.
Italian manufacturer Pirelli immediately responded by bringing a new range of rubber for this race, despite claiming its tyres were safe if used correctly.
Pirelli stated the teams had adopted a number of practices - swapping over the rears, running too-low pressures and excessive camber - that ultimately compromised the safety of the tyres.
For this event, however, Pirelli's rear tyres only posses a belt made of Kevlar that is more puncture resistant, as opposed to the steel previously used.
So far the tyres have done their job as all three practice sessions and now qualifying passed without a hitch.
The session, however, proved to be a mixed bag for Mercedes, as complacency set in amongst the Brackley-based marque during the second session.
Nico Rosberg, on the front row in four of the last five races, including a run of three successive poles in Bahrain, Spain and Monaco, will start 11th.
With the team believing Rosberg's lap of 1:30.326 was enough to see him into the top-10 shootout, the German sat in the garage looking on aghast as his name slowly slipped down the timesheet and out of the running for another pole position.
Ahead of Rosberg, and behind the leading duo will be Red Bull's Mark Webber, two tenths of a second behind Hamilton.
Lotus duo Kimi Raikkonen and Romain Grosjean will line up fourth and fifth, with Toro Rosso's Daniel Ricciardo sixth as he again showed he has what it takes to fill Webber's shoes once his fellow Australian quits F1 at the end of the season.
After foolishly using the faster soft tyres to get out of Q1, Ferrari opted to save a set of that particular rubber in Q3.
Fernando Alonso and Felipe Massa posted deliberately slow times on a set of mediums to get grid position, and so start seventh and eighth respectively.
On the fifth row will be McLaren's Jenson Button and Nico Hulkenberg in his Sauber, neither of whom set a time.
Force India's recent pace also deserted them, potentially as a result of the change of rear tyres, as Paul Di Resta and Adrian Sutil will start 12th and 15th.
Sandwiched between the duo will be McLaren's Sergio Perez and fellow Mexican Esteban Gutierrez in his Sauber, with Jean-Eric Vergne 16th for Toro Rosso.
On the official occasion of the team's 600th grand prix, Williams' miserable season continued as they failed to get either into Q2 for the first time this year.
Valltteri Bottas only just failed to scrape out of Q1 by 0.012secs, the Finn edging team-mate Pastor Maldonado by only 0.014secs, albeit with the duo starting 17th and 18th.
On the final two rows, and is customary these days, are Caterham and Marussia, with Charles Pic edging the battle of the backmarkers for the former.
Pic will line up 19th ahead of Marussia's Jules Bianchi, with Geido van der Garde for Caterham 21st, leaving Max Chilton in his Marussia to start at the back, the Briton a second down on his team-mate.
In explaining his issues in practice, Hamilton claimed it was "really overwhelming" to eventually clinch the 29th pole of his F1 career.
Hamilton added: "Since P1, which was pretty good, P2 and P3 were just disasters. It was even worse this morning. I was a good eight tenths of a second off, and I wasn't comfortable with the car at all.
"So we went back into the truck, analysed everything, put in a lot of hard work, and fortunately the car was beneath me (in qualifying) and I'm grateful for all the work the team have put in.
"It's a privilege to drive for this team, they've great history, so I'm proud to be able to get pole for them, but there are no points today. They come tomorrow.
"I hope with my new set up the pace will be as good and we can given them (Red Bull) a run for their money."
Despite missing out on pole in front of his own fans, Vettel said: "It was quite close, and I tried everything I had.
"But we are much closer to them here than we were in Silverstone. We have made some progress and are confident for tomorrow.
"We've done our homework and now it's up to us. We are on the front row, which wasn't quite enough for pole position, but I am looking forward to tomorrow."
Webber, like Hamilton, conceded to suffering his own issues that left him "happy to be where I am" in third.
He added: "I'm not sure what happened. It (the car) was very sensitive.
"It's pulled everyone together a little bit. We are happy with the car in long runs, and we're in a good position tomorrow."