Arizona State's Trent Lockett led all scorers with 22 points, but no other Sun Devil reached double figures. Gary finished with 18 while Williams added 15 as well as three steals.
New Mexico (2-0) used a 20-0 run over a seven-minute span to turn a 13-7 deficit into a 27-13 advantage. The Lobos had four steals in the stretch while ASU (0-1) went 0-for-7 from the field.
The Sun Devils trimmed the lead to 35-29 behind a 9-2 run to close the half.
ASU got within 50-45 in the second half, but consecutive 3s from Curtis Dennis and two by Williams helped push the lead back to 62-49 with 6:50 left. The Lobos kept the lead in double figures from there.