The Frenchman put his Toro Rosso on the third row, while Hartley reached the final part of qualifying for the first time in his career.
Gasly, who qualified in the top six for the second time in 2018, said that it was a chaotic session, but that it was almost perfect for the team.
“Just unbelievable, what a crazy qualifying. We had the slick tyres, inters, wets and yeah, just a fantastic day for the team,” Gasly said.
“We have had difficult weekends, and P6 today is just unbelievable.”
However, the Frenchman said that it was a team performance, especially with the strategists when it came to the weather conditions.
“Honestly it was really tricky because the conditions were changing every two laps, so honestly they did the right call,” he continued.
“I was trying to give clear feedback but they did the right call to put me on slick tyres at the right time, inters and wets, so a really good job by the team.”
Despite qualifying in P6, Gasly did say that the team has to prepare for Sunday, but said that they knew this could be a good circuit for them.
“In the dry, the car felt really good since the beginning of the weekend and it is a track that I love and I knew there would be an opportunity for us this weekend,” the Toro Rosso man added.
“So far everything went well, but [the] most important day is tomorrow and hopefully I can keep going like this.”
The Toro Rosso team do know that they have stronger cars behind them on the grid, and that scoring points is what they want to do on Sunday.
“You’ve got Max [Verstappen] right behind us, you’ve got Daniel [Ricciardo] as well, with mega pace,” the 22-year-old added.
“It is going to be difficult to keep these guys behind. It is going to be tough but we will keep pushing.”
“We have both cars in the top ten so really good performance by Toro Rosso and hopefully we can score some points tomorrow.”
The other Toro Rosso, with Brendon Hartley behind the wheel, qualified in P8. This is the first time that the Kiwi has made it into Q3.
Hartley, like his team-mate, said that the conditions were tricky on the Hungaroring circuit during qualifying.
“There were really tough conditions out there, many times my engineer was telling me ‘this is your one shot’,” Hartley said.
“I had a couple of mistakes just at the end of Q3 and just fell short of my team-mate.”
Despite the tricky track conditions, the Kiwi was pleased with his efforts, and is looking forward to Sunday’s race.
“But it’s my first time in Q3, it was a really good effort and hopefully we can hang on to a points position tomorrow.”