After Elizabeth Williams followed with a layup, Gray added two more free throws to put the Blue Devils up 55-46 with 5:52 left.
Maryland briefly cut it to five before Williams and Gray hit layups. Coach Brenda Frese was given two technical fouls and tossed during a media timeout with 3:51 left — she said she was sticking up for her players because they were in danger of being injured — and Gray hit the four free throws that followed to give Duke its largest lead to that point, 63-50.
Gray finished with a career-high 28 points and Tricia Liston had 17 points off the bench for the Blue Devils (22-1, 12-0).
Gray made more free throws (13) than Maryland attempted (11). She surpassed her previous career high of 25 points set last season against North Carolina State.
"I still only had three assists and three rebounds," she said, "so there's definitely room for improvement."
Williams added 16 points and 10 rebounds for Duke, which won its 36th straight ACC game at Cameron Indoor Stadium and hasn't been beaten by a conference rival at home since Maryland did it five years ago.
Katie Rutan had 14 points and hit four 3-pointers for Maryland, which rallied from 10 points down and tied it at 33 on Rutan's 3 barely 2 minutes into the second half.
Duke never trailed and twice led by 10 during a sloppy-at-times first half in which the Blue Devils managed just two field goals in roughly 11 minutes.
Liston twice pushed Duke's lead to double figures, the second time coming on her jumper with just under 5 minutes left in the half that made it 28-18. The Terps clawed back and cut it to 30-28 on Malina Howard's running jumper in the final minute, and it remained tight until Gray almost single-handedly broke the game open.