William hit a 15-footer to cap it, moments after a replay review awarded UConn two free throws for a flagrant 1 foul call that tied the game with 26.6 seconds left.
The Bulldogs (34-4) will play South Carolina for the national championship Sunday night in a matchup of two SEC teams.
Mississippi State (33-5) and UConn met in the Sweet 16 last season and the Huskies won by 60 points - the most-lopsided win in regional semifinals history. All season long the Bulldogs had that humiliating loss on their minds.
Now they've erased that defeat, beating UConn (36-1) - which had won the last four national championships - on the grandest stage in one of the sport's greatest games.
UConn coach Geno Auriemma had a wry smile on his face after the final shot. There wasn't much else he could do, another title suddenly beyond his grasp.
Mississippi State led 64-62 before a replay review gave Katie Lou Samuelson the two free throws that tied the game. After a UConn turnover, William held the ball at the top of the key before dribbling to her right and pulling up for the shot, with the ball in the air when the buzzer sounded.
The Bulldogs ran onto the court, piling up at center court while UConn players stood stonefaced. Mississippi State coach Vic Schaefer grabbed William in a bear hug, with former Mississippi State star Dak Prescott - the Dallas Cowboys quarterback - helping lead the cheers.
UConn rallied from a 16-point deficit, its biggest during its NCAA record streak, to take a 59-56 lead in the fourth quarter. The teams were tied at 60 when the Bulldogs had a chance to win it in regulation, but William's shot was blocked, sending the game into overtime.
The Huskies hadn't lost in 865 days, with that defeat coming to Stanford on Nov. 17, 2014.
Neither team scored much in OT with Teaira McCowan's layup with 1:12 left in the extra session breaking a 62-62 tie. It was the lone basket for Mississippi State in OT until William's game-winner.
During their last two decades of dominance where they've won 11 national championships, the Huskies rarely found themselves trailing - let alone by double-digits. This was the first time this season that UConn was losing in the fourth quarter.
The Bulldogs got off to a great start, taking it right at the Huskies like not many teams had done during the streak. The Bulldogs led 15-13 before scoring 14 straight points to go up 29-13. It was the biggest deficit UConn had faced during its historic streak and one of the largest during the last 22 years, which the Huskies have dominated with 11 national championships.
The Huskies rallied to within 29-25 as senior Saniya Chong scored seven points during a 12-0 run. Mississippi State answered and was up 36-28 at the half.
UConn came back in the third quarter behind its trio of All-Americans with Gabby Williams, Napheesa Collier and Samuelson keying a 12-3 run to start the second half. That run brought Huskies alums Sue Bird, Breanna Stewart and Maya Moore, who were sitting 20 rows behind the UConn bench, to their feet.