The unseeded Indian, ranked 111, tamed the giant-killing British rival in a hard-fought second round match after one hour and 40 minutes struggle.
Keothavong, ranked 88, had shocked second seed and world number 16 Dominika Cibulkova of Slovakia in the opening round.
Sania has also reached the doubles quarter-finals with Australian partner Anastasia Rodionova.
The top-seeded pair routed a hapless French pair of Iryna Bremond and Caroline 6-0 6-2 in the first round.
They are now up against local pair of Varatchaya and Varunya Wongteanchai in the last-eight stage match.
In the singles match today, Sania served extremely well in the second set and put behind an early break to stage a brilliant comeback.
She saved a crucial breakpoint in the 11th game and then broke Keothavong for the second time to claim a well-deserved win.
She will now face either Japanese Kimik Date-Krumm or Chinese Taipei qualifier Su-Wei Hsieh in the quarter-finals.
Sania had lost in the qualifiers at this event.