Verstappen will lineup 15 th because of result.
The Toro Rosso had looked quick over one lap all weekend, but such is the ferocious nature of the midfield battle that team mate Brendon Hartley missed out on a place in Q3 by just under 0.1s.
Verstappen complained about a lack of speed in his Red Bull on Friday.
But he would step up to the plate taking fifth and shall be promoted to fourth on the grid for the race after the five-place gearbox penalty for Lewis Hamilton.
Kimi Raikkonen has topped the leaderboard ahead of Ferrari teammate Sebastian Vettel in the second practice session for the Bahrain Grand Prix.
But Verstappen's chances were shattered in the first qualifying session as he crashed into the barriers after losing the rear end of his vehicle at turn two. That shows how Gasly had to deliver and he duly did, with an impressive final run putting him best of the rest behind the Ferraris, Mercedes and Ricciardo.
"Although we were untroubled by any reliability issues, and we ran through our programme as expected, it wasn't our best day from a performance point of view", said Mercedes technical head James Allison. "I think it's never happened to me before in my career, something like that".
English Premier League Report: Arsenal v Southampton 08 April 2018
Charlie Austin restored parity for Southampton in the 73rd minute but Welbeck got the victor eight minutes later. Southampton remain third-bottom, three points from safety but with a game in hand over Crystal Palace in 17th.
"People may say I'm pushing too hard, but I think I'm experienced enough to know what I'm doing in Q1 of qualifying", he replied when asked.
His time in the Friday afternoon session was not representative of his actual pace, however, as Hamilton locked up in his Mercedes while on his fastest lap before then reporting his tires were "dead".
The team needs a good outing after the poor showing in Melbourne.
It all leads up to Sunday's race, which starts at 4.10pm BST and where Hamilton and Vettel will again expect to lead the pack.
Verstappen headed into the qualifying session with the hope he could get his vehicle high up on the grid for tomorrow's race. He got out and helped stewards wheel it back to the team garage. "You can see it through turn 2, got on the kerb there", he sighed.
If the layout of the Bahrain International Circuit wasn't enough to encourage overtaking on its own, the DRS zone on the pit straight has been extended by 100 metres to give the following vehicle an even better chance of making a move on the approach to the first corner.