Second-seeded John Isner, however, was an upset victim.
Hewitt, seeded fourth and the defending champion, survived against Somdev Devvarman 1-6, 6-0, 7-6 (7-2). Gonzales eliminated Kevin Anderson 6-4, 4-6, 6-4.
Hewitt is playing for the first time since late January after undergoing surgery on his right hip. He will meet Juan Ignacio Chela in the quarterfinals.
Isner fell to Xavier Malisse 7-6 (7-3), 6-7 (7-9), 7-6 (7-3) in a match that lasted 2 1/2 hours.
Third-seeded Sam Querrey reached the quarterfinals with a 6-2, 6-1 decision over Blaz Kavcic and will face Nicolas Massu in the next round.