The English centre-back converted past Jordan Archer with a quarter of the match played to earn the Millers a second league win of the season.
Victory for United at the New York Stadium lifts them above the Lions in the Championship table on six points from five matches.
The hosts were ahead through the first serious effort of the contest, as Raggett climbed above a sea of Millwall bodies to connect with Will Vaulks's delivery.
Semi Ajayi, called up to Nigeria's squad this week, then sent a shot into the side-netting to signal the end of a tight opening 45 minutes.
An end-to-end second period saw Ryan Manning and Williams exchange shots in quick succession, with neither doing enough to find a way through.
Defeated in three of their last four outings, including each of the last two, United could not quite put the game out of their opponents' reach in the final half-hour of the match.
ROTHERHAM UNITED (4-2-3-1): Rodak; Vyner, Raggett, Wood, Mattock; Vaulks, Ajayi; Williams, Manning, Vassell (Newell 87'); Smith (Proctor 76')
MILLWALL (4-4-2): Archer; McLaughlin, M Wallace, Cooper, Meredith; Wallace, Tunnicliffe (Morison 79'), Williams, O'Brien (Skalak 65'); Gregory (Bradshaw 65'), Elliott