The 32-year-old came from a set down to beat Chanelle Scheepers 4-6 6-2 6-3 to put the United States 1-0 up in the tie.
However, South Africa responded with Kevin Anderson claiming a 7-6 (7-0) 7-6 (7-5) win over John Isner, who is ranked 23 places higher than his opponent at 14. Williams and Isner then came together for the deciding rubber and clinched the tie by winning the mixed doubles 6-3 6-2.
Photos: Aamir Khan with brother Faisal, ex-wife Reena Dutta at MAMI
Photos: Sonakshi Sinha, Sushant Singh Rajput at Mumbai airport
Spotted: Ajay Devgn and Kajol at an event in Mumbai
Birthday special: 21 cricketers who made their Test debut as teenagers
Pics: Prabhas, Tamannaah Bhatia at 'Baahubali 2' first look launch at MAMI