Hamilton looked on course for victory, but Vettel took advantage of running longer and pitting during a virtual safety car period to lead the race before absorbing massive pressure from his old rival to secure his 48th career victory.
Reigning world champion Hamilton has now converted just two of his seven pole positions in Melbourne while Vettel’s victory means he has now achieved 100 podiums, joining Michael Schumacher, Alain Prost and Hamilton in that elite club.
Vettel's teammate Kimi Raikkonen kept Red Bull's Daniel Ricciardo at bay to secure the final podium position, but there was heartbreak for Haas as both Kevin Magnussen and Romain Grosjean retired from fourth and fifth following a wheel gun issue during their pit stops, which stewards are investigating.
Hamilton got away cleanly from pole to maintain the lead into Turn 1 and then held off an optimistic attack from Raikkonen into Turn 3.
The duo then traded fastest laps across the first stint, with Hamilton gradually stretching his lead as the first round of pit stops approached.
Ferrari were the first to blink, calling Raikkonen in from second on lap 19 with the Finn swapping the ultrasoft tyres for the more durable softs, rejoining in third.
Mercedes responded immediately, bringing Hamilton in next time around and mirroring Raikkonen’s tyre strategy, with the Briton re-joining in second. Vettel stayed out, as Ferrari rolled the dice, with Hamilton slowly chipping away at the German's lead as he made the most of his fresher tyres.
However, the race was turned on its head when Haas drivers Magnussen and Grosjean, who were running fourth and fifth, retired within a lap of each other. The team had an issue with the wheel gun, as both pulled off the track on their out laps after visiting the pits.
Haas team boss, Guenther Steiner, dumped his head in his hands on the pit wall as the reality of the loss of a huge haul of points hit.
The virtual safety car was activated, allowing drivers who had not pitted to gain an advantage by diving in as the rest of the field was driving to a permitted minimum lap pace. Vettel was one of those drivers and a clean stop by Ferrari helped him emerge from the pits ahead of Hamilton.
Hamilton was gutted, asking his team on team radio what happened and whether he had made a mistake. His team responded that they thought they were safe but “there’s obviously something wrong”.
Vettel and Hamilton traded fastest laps, with Hamilton keeping himself within one second to give him access to the DRS, but he struggled to find a way past.
Further back, Ricciardo, who had started eighth after a three-place grid penalty, pulled off a brilliant pass on Renault's Nico Hulkenberg to begin his recovery drive. The Australian came from miles back, going deep on the brakes into Turn 13 to make the pass stick. As the two Haas drivers retired and his teammate, Max Verstappen, survived a 360-degree spin, he soon found himself fourth – heaping the pressure on Raikkonen – with the chance of becoming the first Australian to score a podium on home soil within touching distance.
Up front, it was nip and tuck between Vettel and Hamilton. The reigning world champion asked his team: “Can I push yet? You know how much you want it. Come on. I’m going for it”. Hamilton put the hammer down, closing to within half a second, but he had a lock-up into T9, running wide and dropping back to 2.9s from Vettel, who then controlled things to the chequered flag.
McLaren kicked off their season strongly with Fernando Alonso’s fine fifth the team’s best result since the 2016 United States Grand Prix, earning him the driver of the day award, with teammate, Stoffel Vandoorne, finishing ninth.
Verstappen crossed the line sixth, with Hulkenberg seventh and Valtteri Bottas, who started from 15th after crashing his Mercedes in qualifying, eighth. Carlos Sainz completed the top 10 in the second Renault.
Force India finished just outside of the points with Sergio Perez and Esteban Ocon 11th and 12th respectively, while Charles Leclerc impressing on his debut with 13th for Sauber. Williams' Lance Stroll and Toro Rosso's Brendon Hartley completed the finishers.
Sergey Sirotkin became 2018’s first retirement, following brake failure, while Pierre Gasly’s Honda engine expired to put the Toro Rosso driver out. Marcus Ericsson’s Sauber failed to finish, too, after he encountered a power steering problem.