Razzano, a 30-year-old Frenchwoman ranked 131 in the world, wasted four match points but faced two herself before sealing a 6-7 (6/8) 7-5 7-6 (10/8) victory at the Omni La Costa resort in Carlsbad.
Victory took three hours and 35 minutes and earned her a semi-final match against fifth seed Sam Stosur.
The Australian defeated second seed Agnieszka Radwanska 7-5 2-6 6-3, with a break in the eighth game of the final set taking her to the brink of victory.
Radwanska saved one match point before Stosur booked a place in the semi-finals of a WTA Tour event for the first time this season in a little more than two and a half hours.
A bad day for the Radwanskas was capped in the final game of the day, when Ursula - the younger of the two sisters - was knocked out by Victoria Azarenka.
The top seed did not look back after breaking in the third game of the first set and a smash gave her the break in the fourth game of the second set.
Azarenka went on to wrap up a 6-1 6-2 victory in a little more than an hour and a quarter.
The Belarusian's semi-final opponent will be Ana Ivanovic - the Serbian had earlier seen off fourth seed Roberta Vinci 6-1 6-7 (1/7) 6-2.
Martina Hingis' return to action is over, as she and Daniela Hantuchova were beaten by Raquel Kops-Jones and Abigail Spears in their women's doubles quarter-final.
The 32-year-old Swiss retired in 2007 but last month accepted a wild card invitation to partner the Slovakian in this event.
Hingis and Hantuchova won the first set and broke in the first game of the second. However, they failed to maintain the momentum against the American pair and went out 6-4 5-7 3-10.