The 2008 world champion appeared to be in danger of Q2 elimination until he surged from 13th to first in the segment with his last lap.
Hamilton went on to qualify second, 0.254 seconds down on pole-winning team-mate Nico Rosberg.
"I haven't had the best of weekends up until now," said Hamilton.
"This is still great for us today to be one-two on the grid but I have been struggling all weekend.
"The long runs were pretty poor, but on one-lap pace the car doesn't seem to be too bad.
"I seemed a bit lost, not knowing what to change and where to go, so I didn't make changes in practice three and into qualifying, I didn't make any changes. I wasn't 100 per cent comfortable."
Rosberg warned that maintaining Mercedes' pace over a race distance would be tough, and Hamilton agreed that victory did not seem realistic.
"We will do the best job we can from the start, but more of a concern is looking after the tyres," he said.
"I love that we are going to try and get into Turn 1 first, that will be really good for the team.
"We have to improve our race pace. We have very good qualifying pace. I hope in the future we will get that win."
He also denied being disappointed by being overshadowed by his team-mate for the second qualifying session in a row.
"Sometimes you get beaten, sometimes you go ahead - that is the name of the game," Hamilton said.
"At the end of the day he is quicker today and I just have to work harder - simple."
- Sports & Recreation
- Motor Racing