Federer, his play spotty but good enough to continue his domination of his frequent foe, ousted Gonzalez 6-3, 5-7, 6-2.
Andy Roddick, the lone American remaining in the singles draw, came back strong in the third set to beat David Ferrer 7-6 (5), 3-6, 6-3. Roddick finished with 10 aces against his Spanish opponent, who served eight of his own.
Roddick, ranked No. 7, had difficulty handling Ferrer’s service returns in the second set, but he won 15 of 18 of his first serves in the third.
“My rhythm on my serve went off in the second set and I guess I was developing a pattern,” Roddick said. “But he played well. I thought I hit the ball well in the second set.
“The guy’s a bulldog and he just does the basics so well. He’s a good player.”
Andy Murray also advanced, extending his fine 2009 start to 18-1 when Tommy Robredo retired in the second set of their match because of a wrist injury. Murray won the first set 6-2 and was up 3-0 in the second.
Defending champion and No. 3 Novak Djokovic outlasted Stanislas Wawrinka 7-6 (7), 7-6 (6). Juan Martin del Potro defeated John Isner 7-6 (4), 7-6 (3), and Ivan Ljubicic downed Igor Andreev 4-6, 7-6 (5), 7-6 (4).
On the women’s side, No. 11 Victoria Azarenka knocked off No. 2 Dinara Safina 6-7(4), 6-1, 6-3 in a quarterfinal match. A 19-year-old from Belarus, Azarenka won titles at Brisbane and Memphis earlier this year. She is the No. 8 seed in the Indian Wells event. Safina, a 22-year-old Russian, was the top seed.
No. 6 Vera Zvonareva also advanced, taking a 6-4, 6-2 victory over Caroline Wozniacki in their quarterfinal.
Federer, ranked No. 2 after losing his four-year hold on the top spot to Rafael Nadal last year, was inconsistent against No. 17 Gonzalez. The Chilean fought his way back into the match in the second set, overcoming earlier frustration he had vented by slamming a racket onto the court — three times — and shattering it.
Federer, the tournament champion three consecutive years beginning in 2004, said he felt he finally was able to establish some rhythm in his game after playing mostly serve-and-return against his first two opponents.
“Today was a bit more baseline, even though I couldn’t find his (Gonzalez’s) backhand,” Federer said. “If you don’t find his backhand, the point is over quickly. He has such a massive forehand.
“I’m looking forward to playing against (Fernando) Verdasco. It’s a good thing that I’m still in the tournament and facing an opponent who actually is going to extend the rallies a little bit.”
Verdasco defeated Philipp Kohlschreiber 6-4, 3-6, 6-1 to earn the quarterfinal appearance against Federer.
Murray, ranked No. 4, said he anticipated a difficult test heading into his match against Robredo.
“I was expecting a tough match. I had lost to Tommy two previous times I played him,” the 21-year-old Scot said. “I knew I had to be on my game.”
Murray said he was aware Robredo had a problem with his wrist, although he still seemed to be hitting the ball OK.
“But mentally, a wrist problem can be tough,” Murray said. “I know because I’ve been through it. It’s just the pain that’s there and feeling like something might happen.”
Also on NBCSports.com
College hoops: Check out brackets, play the game
NHL: It's a no-brainer — Brodeur best goalie | Video
NBA: Fact or fiction of players missing in action
NFL: Peppers probably won't end up with Pats
Baseball: Only one solution — amnesty for users