Caleb Williams rallied Chicago from an 11-point fourth-quarter deficit, throwing the winning touchdown with three seconds left as the Bears beat Detroit 39-35.