The American took the opening set after Dodig double-faulted to give Querrey a 6-5 lead. In the second set, a netted forehand at 4-3 earned Dodig the only break. In the final set, a forehand error at 3-2 left Querrey in charge.
"Tough match," Querrey said. "We both served very well so it was just a matter of a couple of points here and there. I'm proud of myself after losing the second set to come back strong in the third."
Querrey will face sixth-seeded Marin Cilic of Croatia, who advanced 6-4, 2-0 when Yen-hsun Lu of Taiwan retired due to groin pain.
Lu had earlier upset third-seeded Janko Tipsarevic 6-3, 2-6, 7-6 (5) in a third-round match that was suspended overnight because of rain.
David Nalbandian twice rallied to reach the semifinals, first overcoming Edouard Roger-Vasselin of France 4-6, 7-5, 6-3 in a third-round match postponed on Thursday, and then beating Xavier Malisse of Belgium 4-6, 7-6 (2), 6-4.
Jo-Wilfried Tsonga's participation at Wimbledon remains in doubt after his injured finger was examined at a clinic in Geneva.
The Frenchman injured the little finger of his right racket hand when he fell during the final set of his third-round defeat to Dodig on Thursday.
Although there is no break as Tsonga feared, the finger is severely strained. He will have another exam on Monday.