Hamilton was four-tenths of a second faster than Vettel and half a second quicker than a disappointed Rosberg, who had been bidding for a third successive Bahrain pole in a bid to rekindle his title challenge after winning just one of the last 12 races.
Despite his mastery, Hamilton conceded that a revived Ferrari team, led by four-time champion Vettel, would be a major threat in Sunday's race at the Sakhir circuit.
"They have got great race pace, but hopefully with our positioning that does help and we will be taking all measures we can to make the tyres go as long as they do," said Hamilton. "I think we are in a good position, so, I'm looking forward to the fight."
Rosberg admitted that "strategy-wise, I got it wrong today... I was thinking too much about the race and I under-estimated Sebastian's speed".
"I took it easy in Q2 to save the race tyres, so I lacked the rhythm for Q3. That's where I went wrong today. Being third is not ideal."
It was Hamilton's first pole in Bahrain, the first time he has taken four poles in a row and the 42nd of his career.
Vettel delighted Ferrari's fans and management. He said: "I am very happy with second today. It was a tough session, I didn't find the rhythm to begin with, but at the end it was getting better and I could push.
"Very happy with the front row - in the race we are maybe a bit closer so let's see what happens."
- AAP