In a dramatic and incident-packed qualifying session, the defending three-time world champion judged his speed and tyre-selection to perfection in the changing conditions to claim the prime starting spot with a best lap in one minute and 7.922 seconds.
It was his second successive pole in Austria, his fifth of 2016 and the 54th of his career.
His Mercedes team-mate and championship leader Nico Rosberg was second fastest, but the German will start Sunday's race with a five-place grid penalty after a gearbox change following his crash in practice on Saturday morning.
"It was very, very slippery, but it was drying up corner by corner - at the end it was just about getting that last lap in so I am very happy."
More From This Section
Rosberg, who will start from seventh, said: "It was very exciting and and I must say a really unbelievable job by the team, even Lewis's mechanics came to help on my car.
"It was very tight and an awesome effort by them all. Lewis did a good job at the end. Second is ok, but five places will be costly for me but I will make the best of it."
Yet another German, four-time champion Sebastian Vettel, was fourth for Ferrari, but he also faces a five-place grid penalty for a gearbox change.
Briton Jenson Button timed his intervention to perfection also to take fifth place for McLaren Honda ahead of Finn Kimi Raikkonen in the second Ferrari.
"I love these conditions," he said. "Can we have them every week?"
Australian Daniel Ricciardo was seventh for Red Bull ahead of Finn Valtteri Bottas of Williams, Dutch teenager Max Verstappen in the second Red Bull and Brazilian Felipe Massa in the second Williams.
Hamilton is seeking to reduce Rosberg's 24-point lead in the drivers' championship after eight of this year's 21 races. Rosberg is seeking to complete a hat-trick of successive wins in Austria.
The session began in warm conditions with a track temperature of 51 degrees Celsius, enough to give Ferrari confidence and cause concerns for some of the other teams.
Hamilton was one of the first men out and swiftly clocked a new record lap in 1:07.014, trimming it to 1:06.947 before Rosberg joined the fray. He soon went fastest again in 1:06.690.
It was the third suspension failure of the day following Rosberg and Mexican Sergio Perez of Force India, who was able to retain control and steer his car back to the pits.
The session was red-flagged and stopped for 17 minutes before a frantic final 90 seconds saw Spaniard Carlos Sainz pull up with smoke pouring from his Toro Rosso car.
Drivers have to start Sunday's race with the tyres they used for their best times in Q2, a requirement that created tricky decisions for the teams in the changing conditions.
Ferrari and Red Bull both gained a potential strategic advantage with their starting tyres for Sunday's race - super-softs instead of the riskier ultra-softs of Mercedes.