The Bears (11-1) used an 18-2 run that spanned both halves to take control and held on as the Gamecocks (8-5) cut a 17-point lead to 72-63 on Devan Downey's 3-pointer with 3 minutes left.
Udoh also had 12 points for his seventh double-double this season.
Baylor hadn't won seven in a row since starting the 2000-01 season 12-0.
"I'm very pleased with our team. That's two straight road games. Anytime you play two straight road games against good competition, its hard to get a win," said head coach Scott Drew. "I thought we had great poise, great leadership. Credit our defense to our upper classmen and tone they set this year."
Gamecocks leading scorer Devan Downey had 20 points on 6 of 25 shooting.
Baylor took control of this one late in the opening half, breaking free from a 25-all tie with a 13-2 run to the break. That margin grew after halftime with the Bears scoring the period's first five points and eventually leading 55-38 as Dunn completed a three-point play with 14:39 to go.
South Carolina could not come closer than 9 points the rest of way.
Holmes was kicked off South Carolina's team on Friday for repeatedly violating team rules, Horn said. That meant the Gamecocks would play this one without their two leading rebounders from last season since they said last month that forward Dominique Archie needed season-ending surgery.
And that was bad news with the Bears coming in.
Baylor is the Division I's second tallest team with an average height of 6-6 -- only Kentucky is taller at 6-7 -- and started three players in 6-10 forwards Udoh and Anthony Jones and 7-foot center Josh Lomers taller than any Gamecock.
Still, South Carolina hung in despite the mismatch and tied it at 25-all on Austin Steed's putback with 4:06 left.
That's when Baylor pushed its advantage underneath with its go-ahead run.
Tweety Carter got things started with a driving basket, then Lomers scored from in close, Jones tipped back Carter's miss. Moments later, Jones stepped behind the line from deep in the left corner for a three and Quincy Acy broke free for an easy bucket with 1.8 seconds remaining.
The Gamecocks missed their final five shots during Baylor's run.
The Bears also got it done from the outside, going 11 of 17 on 3-pointers. Dunn had four of them with Jones and Carter getting three each.
Baylor was also dominant underneath, outrebounding South Carolina 52-39. Udoh's effort surpassed his previous best of 16, set last Dec. 22 against Texas Arlington.
The Bears face Morgan State next on Jan. 6 before opening the Big 12 Conference season against Oklahoma next Saturday.