Hamilton started down in ninth after a disappointing qualifying session but made up five places on the first lap alone and had a good go at team-mate Rosberg, right up until the penultimate corner.
Having jumped ahead of the leading Williams drivers after their two pit stops, Rosberg and Hamilton took control of the race at just over half distance.
Hamilton narrowed the gap to within a second by the final lap but despite a slight mistake from Rosberg coming out of Turn 3, the German held on for his third victory of the season.
Reigning champion Sebastian Vettel had yet another awful race, starting 12th and suffering mechanical problems from the start before eventually retiring after 35 laps.
"It was not the easiest of races, trying to manage certain things which were right on the limit on the car. But in the end I had a very, very fast car again," said Rosberg.
"It was fantastic to win today. It was great also to get a one-two here in Austria. It's been great to come back here," added the German after his eighth successive podium finish and sixth career win.
Bottas was equally thrilled with his maiden podium.
"It's been a long way for us since last year and many, many years at Williams. Now it's so much better," said the Finn.
"The race was exactly what we needed at this point, clean, nice, everything went like planned. The car was good for a podium this time and I'm so happy."
It had been looking good for the Williams duo at the start of the race, Massa maintaining his lead into the first corner with Bottas reclaiming second after momentarily being passed by Rosberg.
But it was the flying Hamilton who made the biggest inroads, storming up to fourth behind Rosberg from his starting position of ninth.
The Brazilian held his lead until the first series of pitstops, Mercedes making the decisive tactical move by pitting their drivers earlier with Hamilton in on lap 13 and Rosberg a lap later.
Williams reacted quickly but it soon became apparent that Mercedes had judged their tactics better, Massa dropping to fourth with Bottas trapped in a Mercedes sandwich.
Hamilton made his second stop on lap 40 but Rosberg’s final change for the harder compound a lap later was a second quicker, although the Briton managed to get the jump on Bottas to take second.
Despite complaining of brake issues similar to those that affected him in Canada, Hamilton managed to gain on Rosberg, but the chequered flag came a couple of laps too early for him to challenge for a first victory in Austria.
Third for Bottas represents the best finish of the Finn’s career and Fernando Alonso enjoyed a competitive outing to finish fifth ahead of Sergio Perez, Kevin Magnussen and Daniel Ricciardo.
Vettel's retirement left the four-times champion in gloomy mood after running for a while despite having dropped to the back of the pack.
"We stopped because we wanted to save some mileage. We were hoping to get a safety car but it wasn't coming so it was pretty pointless to go around a lap down to the field," he said.
- Sports & Recreation
- Motor Racing
- Valtteri Bottas
- Felipe Massa