Lewis scored 25 points and Davis had a season-high 20 to help the Crimson Tide overcome a slow start and the absence of injured guard John Petty to beat South Carolina 90-86 on Saturday night.
"We could have easily folded, especially knowing we had built-in excuses as to why we could lose this with injuries," Crimson Tide coach Nate Oats said. "Our guys fought back and showed a ton of character and resiliency.
"It's a big win."
Davis finished his biggest game of the season by making the second of two free throws with four seconds left to help the Tide (16-13, 8-8 Southeastern Conference) complete a rally from an early 12-point deficit.
Beetle Bolden and Jaden Shackelford each made two free throws over the final 25 seconds after the Gamecocks (17-12, 9-7) staged their own comeback in the final minutes.
Davis also had 10 rebounds and made his second 3-pointer of the season. Lewis dished out six assists while making 3 of 4 3-pointers. Jaden Shackelford scored 18 and Herbert Jones added 10.
Alabama was without No. 2 scorer Petty, who sustained an elbow injury in Tuesday night's loss to Mississippi State.
Keyshawn Bryant led South Carolina with 22 points on 9-of-13 shooting to pace five double-digit scorers. He also collected 13 rebounds for his third straight double double.
"We didn't put up a fight defensively," South Carolina coach Frank Martin said. "We scored points. They should have shot 74 (%) as bad as we were defensively."
The Tide took a 78-70 lead on Beetle Bolden's first basket, a 3-pointer from the corner with 4:33 left.
Bryant's layup cut it to 86-84 with 1:12 left and South Carolina had a chance to tie it but he couldn't make a basket inside.
Trae Hannibal matched Bolden's two free throws with 17 seconds left to keep the Gamecocks alive. Then Davis rebounded Lawson's missed 3-pointer and drew the foul before icing it with a foul shot after one miss and a South Carolina timeout.
Oats said the freshman had put in some early morning workouts to improve his game.
"After they called the timeout (when) he missed that first free throw, I said, `You didn't show up at 6:30 to miss this thing. You've already earned this," Oats said.
South Carolina has lost three of its last four games. Maik Kotsar (eight points) became the 46th South Carolina player with 1,000 career points.
Alabama failed to make a field goal for more than five minutes to open the game, digging 12-1 and 15-3 holes. Made 33 of 47 free throws (70.2%). Has won five straight over South Carolina.
Jones converted a flagrant 1 foul against Couisinard into two free throws and a basket in one late sequence. That was another play that frustrated Martin.
"Turns it over and then whacks the guys in the face," the coach said. "Those are the fouls we committed all night. Just bad plays. You put a team on the line 47 times, and you don't deserve to win."
Alabama's Oats was called for a first-half technical after continuing to complain about a foul call, and Lewis said it got him fired up.
"It actually woke me up a lot because coach was taking up for us because he felt like the refs missed a couple of calls," Lewis said. "He started barking at coach like, `Be quiet.' I was like if coach is going to take up for me, then I feel like us as players should take up for him."
South Carolina hosts Mississippi State on Tuesay night.
Alabama hosts Vanderbilt on Tuesday night.
The coronavirus and college sports: NCAA reopening plans, latest news, program cuts, more
When will college football and other sports return to action? Will more athletic programs be forced to cut sports because of financial strains? Here is the latest on how the coronavirus pandemic is affecting the college sports world.
Bryce Hopkins, Louisville basketball's top 2021 prospect, decommits
Bryce Hopkins, the headliner of Louisville's 2021 basketball recruiting class, decommitted from the school on Sunday.
Florida State basketball lands ESPN 100 guard Jalen Warley
Florida State landed its fourth top-50 prospect in the 2021 class in ESPN 100 guard Jalen Warley.