Vettel is bidding to bounce back from his nightmare race in Germany after he crashed out from the lead to hand the championship advantage back to Hamilton.
Ferrari arrived here hoping that the slow-speed Hungaroring circuit would suit their machinery, and so it proved as Vettel saw off the Red Bull duo of Max Verstappen and Daniel Ricciardo to claim top spot.
Verstappen, however, was just seven hundredths of a second down on Vettel to suggest that Red Bull could take the fight to Ferrari this weekend.
As for Hamilton and Mercedes, they appear to have their work cut out at the sport’s final round before the month-long summer shutdown.
Hamilton, who holds a 17-point lead over Vettel, was fifth in both practice sessions, and finished an alarming three quarters of a second behind Vettel in the afternoon running.
His Mercedes team-mate Valtteri Bottas was even further back in sixth with the Silver Arrows, as has been the case in recent seasons, off the pace at this slowest of the non-street circuits.
Traditionally, Ferrari also tend to hold a little in reserve during practice, so Vettel’s speed is likely to be a concern to their rivals.
Fernando Alonso’s McLaren team have brought a heavily-revised car to Hungary, but there was little improvement for the Spaniard.
Alonso, who celebrates his 37th birthday on Sunday, was only 12th in the order, two seconds down on Vettel.
His team-mate Stoffel Vandoorne has been desperately out of sorts in recent races, and the Belgian was second-to-last in the standings, nearly a full second behind Alonso. He was also fortunate to avoid crashing into the barriers after spinning off at turn five.
Elsewhere, Romain Grosjean was the best of the rest as he finished seventh for Haas. Carlos Sainz was eighth for Renault ahead of Toro Rosso’s Pierre Gasly. Esteban Ocon completed the top 10 in his Force India.
Hamilton is 17 points clear of his rival ahead of the sport’s final round before the summer break in Hungary on Sunday.
To date, the Englishman, 33, holds the mental edge over Vettel following the Ferrari driver’s fourth, and biggest mistake of the year, when he crashed out from the lead in Germany last Sunday.
Hamilton’s remarkable victory in Vettel’s back yard moved him to the summit of the standings to mark the fifth change of championship leader this season.
For the first time in the hybrid era, Ferrari, who are sporting a black stripe on their cars this weekend in memory of chairman Sergio Marchionne who died suddenly on Wednesday, boasts the strongest package.
That was again on show in practice here as Vettel topped the time sheets with Hamilton only a distant fifth.
By his own admission, the Briton has not been at his very best this year, but it is his lack of mistakes, and flashes of once-in-a-generation brilliance, that ensure he remains the favourite to clinch a fifth world crown.
“The psychological game in sport is the hardest thing,” Hamilton said. “You don’t see me away from the track. I wake up with insecurities.
“The most demanding thing is keeping your mind in the game from the first race in March right through to the November, and arriving at every race 100 per cent.
“I haven’t hit the nail on the head at every weekend this year, but the pressures are huge, and the demand on myself and Sebastian is higher than ever.
“It has swung more in Ferrari’s direction so I am having to over-deliver. The pressure to extract every ounce is greater than ever if I want to be number one at the end.
“That is not something I am fazed by, but something that excites me. I have always felt that I have been at my best under pressure. I welcome it.”
Vettel, but for his mistakes, should be leading this championship. He dropped from second to fourth after running off the road in Azerbaijan.
He collided with Valtteri Bottas in France, and was demoted five places on the grid at the ensuing race in Austria after blocking another driver in qualifying.
Last weekend, with Hamilton catching him in the slippery conditions, Vettel threw away a certain 25 points.
“It is closer than last year, so the smallest mistakes are even more costly,” Hamilton added. “But I take pride in being a perfectionist and not making mistakes.
“Nobody is perfect, but I work to position myself mentally and physically so I am the last to crack.”
There have, however, been signs of the intensity getting to Hamilton. He wildly accused Ferrari of playing dirty at Silverstone (Kimi Raikkonen collided with him on the first lap), while his reaction after his car broke down in qualifying last weekend was as if he had lost the title.
In a deleted Instagram post, he then said he did not get the credit he deserved from Sky Sports for his comeback fight from 14th to first last Sunday.
“Positive headlines don’t sell newspapers, and don’t generate clicks,” Mercedes boss Toto Wolff said. “In the here and now the great achievements are not recognised how they should be.
“In five or 10 years, we will look back and say we were part of an amazing driver’s journey. He wears his heart on his sleeve, and polarises opinion, but for me that is fine.”
Vettel should have moved 21 points ahead of Hamilton at the German Grand Prix, but will instead head to Hungary 17 points behind the Briton after his dramatic retirement at Hockenheim on Sunday.
The four-time champion crashed off in the slippery conditions, and, to make matters worse, his rival Hamilton sealed a famous victory from 14th on the grid.
“What an unbelievably dark day for Sebastian,” Rosberg said. “It was surely one of the darkest moments of his whole career.
“It was his home race, he had the chance in his hands to win and take a big lead in the championship, but he chucked it away in the wall.”
Vettel has been found wanting in the heat of his championship battle with Hamilton. His potentially title-deciding mistake on Sunday was his seventh high-profile error in a little more than 12 months. During the same period, Hamilton has not made a significant faux pas, and it is proving the difference between the two quadruple world champions.
Ferrari team principal Maurizio Arrivabene did not mention Vettel by name in Ferrari’s post-race press release.
The Italian team headed into Sunday’s race rocked by the news that their 66-year-old chairman Sergio Marchionne had been stood down from his role through illness.
“In what was a particularly fraught weekend for Ferrari, it would have been important for us to bring home the win,” Arrivabene said. Perhaps tellingly, he added: “Our car had shown it was up to the job.”
Vettel is paid £38million a year by Ferrari, but his mistakes are costing both himself and the team dearly.
Despite his demise, it still required all of Hamilton’s brilliance to claim the 66th win of his career.
“Never write off Lewis because he always comes back, and that is a fact,” added Rosberg, whose relationship with his former team-mate remains frosty.
“He showed it again on Sunday by taking home the win.”
Hamilton’s championship defence had been derailed by a mechanical failure in Austria before he was taken off by Kimi Raikkonen on the opening lap of the British Grand Prix a fortnight ago. His car then broke down in qualifying on Saturday.
“It’s too early in the season to ever really feel like it’s slipping away but it never feels good when you face adversity,” Hamilton said.
“It felt at one point, that, jeez, there was a steep hill for us, but the longer you endure it, the stronger you grow.
“I guess it is a crucial point in the season. It has been up and down, back and forth, but the mistake from Sebastian has been a benefit for us and Mercedes.”