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, 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 said.
"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...
The Mercedes driver moved to the top of the timesheets early on before pitting for fresh tyres, but his final run was ruined when he ran off the track after finding it tricky to see in the wet.
That meant his first run was his best lap, and he claimed that it was nowhere near as good as he could have done.
"For the first lap in Q3, we have to be a little bit more within the limit to make sure you definitely get a lap in, just in case you have something like I have happens or there is a yellow flag," said Hamilton.
"But the most important thing is to get a banker lap, maybe eke out a bit more time. But it doesn't matter. I got what I needed out of it."
Hamilton said his last run did not come together because of the visibility issues and some time lost stuck in Nico Hulkenberg's spray.
"It was very difficult to see - that was the trickiest part particularly at the end," he said.
"I was stuck behind Hulkenberg who slowed down on his lap. I thought he was coming in, and he looked like he was coming in because he went wide on the final turn, but as I got to start the lap he came across so I was stuck behind him.
"I couldn't see a thing as it was like driving through thick fog. And that was the lap that I needed and I should have had to really get pole. So I am so glad or happy that the lap I did before was good enough."
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."
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.
- Sports & Recreation
- Motor Racing
- Sebastian Vettel