The Firebirds were well in control at the Basin Reserve, chasing 149.
When Williams entered the attack in the 18th over the Firebirds needed just 24 to win off 18 balls with six wickets in hand.
He turned the match in spectacular fashion with a two-over spell.
After taking a hat-trick in his first over, Williams closed out the match with wickets off the last two balls of the innings to finish with 5-12.
The win is the third of the season for Canterbury.
They are still in the mix for a spot in the finals with matches against Northern Districts and Otago to come.
Wiiliams' heroics come less than a week after Canterbury batsman Leo Carter hit six consecutive sixes to lead his side to a massive Super Smash win over Northern Districts at Hagley Oval on Sunday.
Wellington remain on top of the table and in the box seat to host the grand final at the Basin Reserve next weekend.