Terrell Vinson and Jesse Morgan had 15 points apiece and Freddie Riley added 14. Williams hit a career-high 15 free throws on 16 attempts for UMass (7-3), which went 26 of 31 from the line as a team.
UMass led by as many as 17 points, 75-58, with 5:41 left to play but East Carolina (7-3) outscored the Minutemen 19-5 over the next four minutes to cut the deficit to 80-77 with 1:06 remaining.
Williams made eight free throws in the final minute for UMass and East Carolina missed five of its last six shots from the field as the Minutemen pulled away.
Maurice Kemp had 21 for East Carolina, which held a slight 34-32 rebounding edge but committed a season-high 20 turnovers