Vettel held provisional pole position after the first runs in Q3, however Leclerc was able to go faster again on the final runs.
Hamilton was over a second down on Vettel after he completed his first timed lap, complaining that he didn't have much front grip on the lap.
However, on the second time of asking, the five-time world champion pulled his Mercedes W10 onto the front row alongside pole-sitter Leclerc, who tops qualifying for the third consecutive event.
Red Bull's challenge faded away as the session went on, with Max Verstappen ending the session over half a second down on Leclerc in fourth place.
The Dutchman did manage to get the better of Valtteri Bottas in the second Mercedes, who was just short of a second down on the pole-sitter. Alexander Albon was sixth in his third outing for Red Bull.
McLaren held the advantage in the midfield fight all weekend and continued that form in qualifying, as it got both cars into the top ten.
Lando Norris, who showed strong form earlier in the session was only tenth fastest and half a second down on teammate Sainz.
Sergio Perez just failed to make it into Q3 after qualifying in 11th, however he will be demoted down the grid due to a gearbox change prior to the session.
Bahrain International Circuit - Winter testing