It marked Webber's third straight pole as the overall Formula One leader goes for a third consecutive race victory. Red Bull has taken pole in all seven races this season.
Webber, the first Australian since Alan Jones to lead the standings, set a new qualifying record with a lap of 1 minute, 26.295 seconds around the Istanbul Park Circuit to lead Hamilton by less than two-tenths of a second.
Fernando Alonso, Red Bull's closest competitor in the drivers' standings, starts 12th for Ferrari.
Red Bull is the first team to secure seven straight poles since Ferrari did so in 2000-01. Four of the five winners at the "Otodrom" started first on the grid.
"It hasn't been the smoothest of weekends for us in getting the running in," said the 33-year-old Webber, who also had a new engine put into his car after Friday's practice. "I was a little bit on the backfoot going in to be honest. But I dug in and got the best out of it."
Hamilton, with girlfriend and pop singer Nicole Scherzinger watching, is in the running for a first victory of the season.
"It's a real boost for me and my team knowing we have a very good baseline pace and our race pace is even better," Hamilton, the 2008 world champion, said after overcoming a spinout at turn 8 in morning practice.
Michael Schumacher's qualifying session also finished at the high-speed corner as the Mercedes driver went off into the gravel. He had already set the fifth best time to sit ahead of teammate Nico Rosberg. Renault's Robert Kubica starts seventh ahead of Felipe Massa, who leads Ferrari going into its 800th GP.
"It was my last go, the fast lap before was a good one, so obviously you try to push even more," Schumacher said. "I went out a bit wide and off it went."
Webber and Hamilton ran untroubled laps to take the first two slots for Sunday's 58-lap race, while their teammates couldn't get their last laps together at the counterclockwise circuit.
A roll-bar failure cost Vettel a chance to catch his teammate while Button pulled off into the pit lane before completing his lap.
"It's a bit frustrating," said Vettel, who was running smoothly in the first two sessions. "When it counted today, it didn't all come together and we need to see why."
Vettel has been plagued by technical problems over the past races, while Webber has soared with a perfect car. They both have 78 points, but Webber leads the championship thanks to his two wins.
On Saturday, Vettel was left shaking his head after the team released Webber ahead of him for the last lap.
"We're quite lucky not to be fourth, it was only a few hundredths of a second," said Vettel, who can have the problem repaired without penalty on Sunday morning.
Button couldn't complete his lap after Schumacher's spin brought out yellow flags.
"That scuppered my chances of moving up," said the reigning F1 champion, who was the last driver to win three straight races with Brawn last year. "It's not too bad, but the last run was a little frustrating. [Still] we're a lot closer to Red Bull than I expected this weekend."
Vettel and Button weren't the only disappointed drivers. Alonso locked up his brakes on his penultimate lap of the second qualifying session, and then had a poor finish on his last lap to miss out on the final session.
Alonso said Ferrari had taken a step backward, and was the fifth-best team on the grid.
"It's not my mistake," said Alonso, who blamed an aerodynamic problem. He said his time of 1:27.612 was close to "the limit of the car."
The Spanish driver has plenty of positions to make up for a second straight race after starting last in Monaco before finishing sixth.
Alonso has 75 points, Button has 70, Massa -- a three-time winner here -- has 61. Hamilton and Kubica share 59 and Rosberg has 56.
The three rookie teams -- Lotus, Virgin and HRT -- all failed to make it out of the first elimination session for the seventh straight GP.