After Nick Cook's dunk gave the Gamecocks (1-1) a 47-46 lead, Williams, who finished with 16 points, hit a 3-pointer and another basket to make it 52-46 with 2:54 remaining.
Rackley, who led Jacksonville State with 17 points, hit five free throws in the final minute and Williams added two.
The Gamecocks led by 10 points, 36-26, early in the second half before the Eagles (1-1) rallied to take a 44-43 lead with 6:42 left on a jumper by Daylen Harrison, who finished with 14 points.
Derek Thompson, who made four 3-pointers in Eastern Michigan's win over Rochester College in its opener, made two during the Eagles' surge.
Jacksonville State made just 3 of 19 behind the arc in the game.