Gasly has struggled so far this season but this was one of his better sessions, although he may be facing a penalty after blocking Romain Grosjean in Q2.
Horner told Sky Sports: "Max's (second) out lap got a little bit messy and we can't predict what the others are doing. Third place and fifth here represents decent grids for tomorrow's race.
"In reality we are probably a tenth or two shy. Mercedes are pretty mighty at the moment. Those guys are fighting for the championship, we've got a grandstand seat. To be on the second grid here, Pierre in fifth as well, it's our best qualifying of the year."