The Finn qualified 0.007 of a second faster than the seven-time world champion Hamilton for a Mercedes front row sweep at the Algarve circuit.
Hamilton was on pole in Italy two weeks ago, only for a rare mistake to allow rival Max Verstappen to ride out the victory, and looked on course for another after beating his practice rivals by 0.490 seconds in the final session.
Verstappen, who trails Hamilton by a point in the standings, edged out both Hamilton, Bottas and his Red Bull team-mate Sergio Perez in Friday’s practice session, but only Bottas improved his time when it mattered on Saturday afternoon.
The Mercedes drivers locked out the front row of the grid for the third round of the season, with Verstappen and Perez in third and fourth.
British driver Lando Norris - third in the championship following a fine start to the season - will sit in seventh for McLaren.
Sebastien Vettel made the third qualifying session for the first time in 16 grands prix and will start in P10.