He won because the other guy screwed up at the last minute.
Actually the other campaign started falling apart in August and never recovered when the polls started going the other way. Webb was assisted greatly by daily articles trashing Allen in the Washington Post.