The Briton saw off Red Bull's quadruple Formula One world champion Sebastian Vettel by 0.055 of a second in a session with two red flags, grid penalties, a 50 minute rain delay and more downpours throughout that left drivers struggling for visibility.
The pole was the 33rd of Hamilton's career, equalling the British record held by the late Jim Clark since 1964, and was secured in a time of one minute 59.431 seconds.
"I'm really happy with how well we've done over the weekend, but today was incredible, how heavy was the rain" Hamilton told reporters.
"It was tricky out there for everyone because at the end it was almost impossible to see. I couldn't see where the track went, where the corners were, where to break.
"I had to bail out of my final fast lap, so it was very close."
Vettel's lap was an impressive turnaround for the German, who retired in Melbourne two weeks ago, after he was called back to the pits after only three laps of the first phase of qualifying with an energy store problem.
The champion re-emerged after a reset of the system and became progressively competitive as the rain grew stronger and felt he could have taken pole had he been able to get in another lap in the final 15 minute session.
"At the beginning of Q1 (the first phase), the heartbeat was rising very quickly when we realised there was an issue," Vettel said.
"Q3 was not perfect. I would have loved to have a second go. My first attempt, I felt there was time to gain here and there.
"It was very close, too close. I should be on the good side for tomorrow but it depends on how good the start is. I'm happy with the result."
ROSBERG STARTS THIRD
Hamilton's Mercedes team mate Nico Rosberg, winner in Australia, will start from third place with Ferrari's Fernando Alonso joining him on the second row despite an earlier collision with Russian rookie Daniil Kvyat's Toro Rosso that required hurried repairs.
Alonso was on the outside and turned into Kvyat with the incident reviewed by stewards, who opted against any penalty.
"I didn't see him coming, Obviously it was a little bit of an aggressive move on the out-lap with that sort of visibility," the double world champion Spaniard said.
Force India's Nico Hulkenburg finished seventh with McLaren's Kevin Magnussen eighth as he and his team chopped and changed with intermediate and wet tyres throughout as they struggled to second guess the weather.
Toro Rosso driver Jean-Eric Vergne and McLaren's Jenson Button rounded out the top 10 with Williams once again struggling despite some promising pre-season tests.
Felipe Massa will start in 13th while Valtteri Bottas finished 15th but was demoted three places after stewards deemed the Finn blocked Red Bull's Daniel Ricciardo, who qualified fifth, on a flying lap.
"He was on his out-lap. I'll have a word with him," said the Australian driver, who was disqualified after finishing second in Melbourne because of a fuel flow issue.
Lotus's woes continued with Romain Grosjean complaining about his car after qualifying 15th, while team mate Pastor Maldonado failed to make it out of the first phase and will start in 17th.
The first phase of qualifying ended 30 seconds early after Swede Marcus Ericsson lost control of his Caterham, hit the wall before flying back across the track leaving debris and almost hitting Esteban Gutierrez's Sauber.