Playing in only his second one-day match since the 2011 World Cup, Williams was aided by Malcolm Waller's unbeaten 39 as he calmly saw Zimbabwe to their target of 253 with 13 balls to spare.
Abdur Razzak's maiden half-century in international cricket had hauled Bangladesh to a competitive total as Zimbabwe were made to regret four dropped catches, but Williams' sensible batting won the day and squared the three-match series at one apiece.
The 30-year-old's previous highest score in ODIs was 35, but the left-hander made the most of a dropped catch to give Bangladesh the impetus at the halfway stage of the match.
Kyle Jarvis was responsible for the drop off his own bowling, and suffered the consequences as he conceded two of Razzak's five sixes - and 17 runs off the final over of the innings.
"We were looking at about 220 and they ended up getting 252, although that was about par on this wicket so we knew that if we batted properly we should get across the line."
Vusi Sibanda returned to form with a solid 49 as Zimbabwe made a confident start to their chase, while Sikandar Raza and Brendan Taylor also contributed without going on to a big score.