Bottas, who has had four second places but is yet to win this year, triumphed at the scenic Red Bull Ring from pole in 2017.
Ferrari’s Sebastian Vettel, 14 points behind Hamilton after eight races, qualified third but faced a trip to the stewards for allegedly blocking Renault’s Carlos Sainz.
“I can guarantee nobody will be more hungry for the win than me,” said Bottas, whose position at the reigning champions has yet to be confirmed for 2019 even though he is expected to be retained.
“The whole weekend we’ve been making good progress with the set-up. We’ve been working to get the car well balanced with the new bits. We did and the car felt so good,” said the Finn.
Mercedes, unbeaten in Austria in the four years since the race returned to the calendar, had brought aerodynamic upgrades to Spielberg after the latest specification engine was introduced in France and they clearly helped.
“Valtteri did a stunning lap with the first run and I made a bit of a mistake,” said Hamilton. “I’m happy with the second run, it is a good result for the team.”
Bottas had lagged Hamilton in practice and the first two phases of the qualifying session but then put down an impressive one minute 03.264 first flying lap in the final shootout.
He went even faster with his second lap, a track record 1:03.130 that Hamilton could not match with his own best effort a mere 0.019 slower.
Ferrari locked out the second row, with Kimi Raikkonen fourth, while Max Verstappen will line up fifth at Red Bull’s home circuit.
Romain Grosjean, yet to score a point so far this season, qualified an impressive sixth for Haas with Red Bull’s Australian Daniel Ricciardo seventh.
Ricciardo, who is rarely seen without a smile, was far from happy afterwards.
“I’m not too impressed,” he told Sky Sports television, questioning his team’s approach to the session with the Australian running ahead of Verstappen.
“We had three runs and I was just punching a hole for everyone. We could have been more fair,” he said. “It is a short lap here so obviously a chance for others, but Haas have been strong and Romain did a good job.”
Haas’s Kevin Magnussen was eighth with Sainz ninth and Renault teammate Nico Hulkenberg 10th.