Ryan Kelly scored 21 points, Seth Curry added 15 points and No. 5 Duke held on to beat Georgia Tech 81-74 on Saturday.
"We don't feel good because we came close," Gregory said. "We also understand that the steps that we need to take as a program where this is the way we should play night in and night out."
Duke (13-2, 1-0 Atlantic Coast Conference) avoided consecutive losses for the first time since Feb. 11 and Feb. 15, 2009.
Former Walton High School star Glen Rice Jr. matched a career high with 28 points and Mfon Udofia finished with 19 points for Georgia Tech (7-8, 0-1 ACC). The Yellow Jackets, who never led, have lost four straight.
Kelly was 14-of-14 from the free throw line, including eight in the final 40 seconds to help seal the victory.
After a sluggish start, Georgia Tech listened to Gregory and started driving the ball to the basket, pulling down offensive rebounds and hitting second-chance shots that allowed the Jackets to keep the score close.
"When you play with that energy and that team attitude, it doesn't always guarantee success, but in the long run you are going to be highly successful," Gregory said. "Our guys don't always buy into that but that is where we are at right now. We played against a highly talented and very well coached team, and we put ourselves into a position where we could win in the last three minutes."
Following Duke's five-point loss Wednesday to Temple, Blue Devils coach Mike Krzyzewski started freshman Quinn Cook at point guard instead of Tyler Thornton and reinserted senior forward Miles Plumlee in the lineup in favor of Kelly.
Freshman Austin Rivers, who began the game with a team-best 15.1 scoring average, scored eight points on 3-of-10 shooting, but gave Duke a boost after missing a pair of free throws with 3:26 remaining and his team leading 68-66.
The Blue Devils took a 72-66 lead with 1:08 remaining when Curry bounced a lob pass off the glass that Mason Plumlee converted for a layup.
"Guys made some big plays to help us win," Curry said. "It showed a lot of toughness on the road in the ACC, and that's what we need."
Krzyzewski was pleased with how Cook responded in his first career start. Cook, who handed out a game-high five assists and scored 10 points, said the coach told him about the lineup change in practice two days ago.
For Krzyzewski, now in his 32nd season at Duke and the record-holder of career Division I victories with 913, the play of Rice and Udofia was impressive.
"Once Rice got going, he was really good," Krzyzewski said. "Udofia, I thought, played one of his best games this year. I watched about six of their games before this and I like him a lot. He's a great kid and he got a rhythm also. We had to play really well to win and there was a lot of game pressure on at the end to see our guys respond that way is terrific."
Mason Plumlee's three-point play at the 8:07 mark of the first half gave Duke, which began the game shooting nearly 71 percent from the field, its biggest lead at 18.
But the Blue Devils didn't score another field goal in the first half after Andre Dawkins' 3-pointer from the right corner made it 36-24 with 4:07 remaining.
Georgia Tech closed the first half on an 11-4 run that included Pierre Jordan's alley-oop, fastbreak pass to Jason Morris for a right-handed dunk in front of Mason Plumlee at the 1:22 mark.
The Yellow Jackets outrebounded Duke 38-26 and were led by Rice's eight. Duke outscored Georgia Tech in points off turnovers, 18-10.
Rice has been through a strange first eight weeks of the season. As a returning starter from the Jackets' final season under coach Paul Hewitt, Rice was suspended by Gregory for the first three games after breaking a team rule and has lately been used in a reserve role.
He went scoreless in a Dec. 29 loss at Fordham and followed that with just five points in a 73-48 home loss Tuesday to Alabama. Against Duke, however, he shot 10-of-17 from the field, including 4-of-7 on 3s. Rice played 32 minutes, third-most on the team.
"We're asking Glen to do something that's so different from what he's ever been asked to do," Gregory said. "And we're asking him to be dependable in doing that because he just can't (only) score. He needs to rebound for us. He needs to create baskets for other people."