The Gryphons will face the No. 2 UNB Varsity Reds in the semifinals after New Brunswick downed the No. 7 Windsor Lancers 6-2.
Teal Burns, Carlos Amestoy and Seth Swanson scored for the third-seeded Gryphons. Chris Collins replied for the No. 6 Dinos.
"They outplayed us for chunks of the game, but he (D'Agostini) helped save the day," Guelph coach Shawn Camp said. "We were able to push back and score some timely goals."
D'Agostini was beat early in the first when Cain Franson re-directed a point shot in but the goal was waved off because it was directed by a high stick.
"Our team had a couple great shifts after that," D'Agostini said.
With the man advantage, the Gryphons made it 1-0 late in the first on a three-way passing play, which Burns completed from the slot, beating goalie Kris Lazaruk.
At the 56-second mark of the third, Collins tied it for the Dinos when he fired a wrist shot past D'Agostini.
The Gryphons regained the lead with 15:09 left in the third when Carlos Amestoy converted a Dinos turnover. Swanson scored the insurance goal at the 16:57 mark.
In other quarter-final action, Cam Braes scored four consecutive goals — including three on the power play — to lead UNB and tie a CIS record for most goals in a national championship tournament game.
"I pride myself on being a playoff performer when the chips are down," Braes said. "I always want to elevate my game."
Cam Critchlow, with a short-handed goal, and Chris Caissy also scored for the Varsity Reds, who outshot the Lancers 38-12.
Drew Palmer led Windsor with a goal and an assist. Spencer Pommells supplied the rest of the offence.
"We thought we gave ourselves a chance to win against a very good hockey team," said Lancers coach Kevin Hamlin.