Vettel enjoyed an impressive first stint in Baku to move up the order, stopping at least seven laps later than his main competitors.
He rejoined in seventh place on Lap 17 and quickly closed in on Charles Leclerc.
The German overtook Leclerc and Gasly in quick succession following the Safety Car, which was caused by Lance Stroll’s tyre failure on Lap 31.
The four-time champion moved up two positions thanks to Max Verstappen and Lewis Hamilton, allowing him to score his first podium for Aston Martin.
“It means a great deal, obviously,” Vettel said after the race. “It was a tough start for us, but it was a great race, we had good pace and that was the key. I had a good start picked up positions straight away, looked after my tyres and as soon as everyone went into the pit I had really good pace to overcut, I think Yuki, at least.
“And then the restart worked brilliantly for me, got another two positions there. Let’s be honest, we obviously had fresher tyres that helped with warming up and switch on, so a great day and I’m over the moon.
“It’s a great podium and we didn’t expect that when we come here but even on Friday, even though we were nowhere, I was feeling quite relaxed. Yesterday we didn’t quite get it but today we did.”
Vettel reiterated that good tyre management was key to his rostrum appearance.
“Strategy-wise, obviously it’s always better if you start further up but the fresh tyre certainly didn’t hurt, because other people had put a couple of lap on their tyre in qualifying, so it helped us go longer, but we really preserved the tyres well, and I think that was the secret for us,” Vettel added. “As I said, the car felt good in the race and that was the key to progress and move forward.”