The second Ferrari of Kimi Raikkonen could only manage sixth and, following his penalty - also due to a gearbox change - after his crash in third practice, he will lose five places and start in 11 place.
While the Mercedes driver had that advantage to start from the pole position and gain a huge lead in the championship, the Dutch from Red Bull destroyed his plans as he did previously with the German driver in Singapore GP.
"I'm running out of opportunities to get this pole so I made sure I made it stick today".
He clocked a lap time of 1m 29.377s but was just edged out by Vettel, who was 0.211 seconds quicker with a 1m 29.166s.
The season has been a particularly eventful one for Vettel after crashing into Hamilton behind the safety vehicle in Baku and hitting Kimi Raikkonen on the opening lap of the Singapore Grand Prix last weekend.
Hamilton said Mercedes had "definitely still question marks" about the car's performance but added: "I saw some stories that we had been thrown off the ball or are on the back foot".
"The results of the last two races were not good, but the auto is strong".
Asked to rate his chances of overhauling Hamilton, Vettel said: "We have a chance". Malaysia was better but I hope we've learned our lessons.
"I don't know. He won't be any more aggressive than I am", said the triple champion.
Sunday's race will also be Honda's last home grand prix as power unit suppliers to McLaren, with the Japanese manufacturer set to tie up with Toro Rosso next year.
"We have a good vehicle and a lot of downforce but it's a bit of a capricious auto - not easy to set up with the tyres".
While Bottas stayed in the garage in second practice, Hamilton felt it important to give the spectators something to watch.
This could indicate teams put more focus on long-run race simulations to make up for track time lost in Friday's rain-delayed afternoon practice.