Alonso stated on Thursday that if the impending summer break was not to be "stressful" and demoralising for both himself and Ferrari, he had to close the gap in the championship battle to Vettel.
The Spaniard, who celebrates his 32nd birthday on Monday, goes into the race at the Hungaroring trailing Vettel by 34 points in the standings.
Although Vettel starts second on the grid in his Red Bull behind the Mercedes of Lewis Hamilton, Alonso lines up fifth, his best result in qualifying since his home grand prix in May which he won.
"Today's result is positive, being fifth on a track that historically has not been so good for Ferrari," said Alonso.
"To be closer to pole position is good news, so tomorrow hopefully we can recover some positions and deliver some points from the race.
"I believe I now have a very realistic chance of closing the gap to Sebastian.
"Starting eighth or ninth, as I have at last two races, and he is on pole then there is no way we can get to him, either at the start or with a different strategy.
"But with him second, me fifth, my first opportunity will be at the first corner."
Alonso is hoping this is the first sign Ferrari are back on the right track with regard to improving the car and knowing how it works.
"This has been a very positive weekend for us so far," added Alonso.
"No doubt we were a little bit lost in Silverstone, qualifying 10th (a penalty for Paul Di Resta elevated him to ninth).
"Then at the Nurburgring we improved, but we were still unhappy with the car, but here we are more happy, especially at a circuit where we were not expecting to be competitive at all.
"It boosts motivation that we will hopefully have a winning car soon after the summer.
"But the good result today can't hide the fact we still have Mercedes (Nico Rosberg starts fourth) in front of us, a Red Bull and a Lotus (Romain Grosjean lines up third).
"When you have four of the fastest cars ahead it makes it that little bit more difficult."
Watch Free Live Streaming From a Different Angle on Racemate LIVE