Bray sank a pair of foul shots with 24 seconds left as the Tigers (17-8, 5-6 Ivy League) finished 4 of 6 from the line to preserve the win.
Princeton shot 50 percent in the first half and led by as many as 15.
After trailing by nine at halftime, the Bears clawed back into a brief 61-60 lead and closed to 65-64 on a pair of McGonagill free throws just inside the final minute. But the Bears closed out 0-for-5 from the field in the last 18 seconds, missing everything from dunks to 3-pointers.
Maryland point guard Melo Trimble has withdrawn from the NBA draft and will return to College Park for his junior season, sources told ESPN.
Louisville's Chinanu Onuaku, who recently underwent a medical procedure to correct a heart rhythm issue detected during the combine, will keep his name in the NBA draft pool.
Andrew White III will return to the Nebraska men's basketball team next season after removing his name from the NBA draft.