The 25-year-old Red Bull driver narrowly edged out the Ferrari man with a best time of one minute 22.808 seconds after Alonso had delighted his compatriots during a wet morning session by clocking the early fastest time.
Just 0.083 seconds covered the top three men as Alonso split the two Red Bulls of Vettel and his team-mate Mark Webber, who was third fastest.
After an all-Mercedes battle involving both Nico Rosberg and Lewis Hamilton in the early stages of the afternoon session, it was Alonso and the Red Bulls that dominated the lead order through the low-fuel runs in the final part.
Meanwhile, Paul di Resta suffered a major scare when the left rear tyre on his Force India car delaminated on the main straight. The Scot parked his car on the grass. He ended up 10th, two places behind teammate Adrian Sutil.