The Co Louth men were the more dominant side in the early stages, with their best chance falling to winger Danny Kearns on 18 minutes, only to see his angled shot from the left pushed away by alert College keeper Ger Barron.
The visitors should then have taken the lead on 35 minutes when defender Michael Hector created the opening for Griffin, only to see his close-range effort pushed away by Barron.
Griffin nearly had the ball in the net with a header seconds before the interval after a neat interchange between Simon Madden and Ross Gaynor. The ball struck the crossbar and was perilously close to crossing the line, only for referee Anthony Buttimer to allow play to continue.
Against the run of play, College nearly had their noses in front on 48 minutes when midfielder Paul O’Connor powered in a shot from 16 yards which was headed off the line by defender Nathan Murphy.
The Students again went close to breaking the deadlock when O’Connor sent in a dangerous cross from the right which enabled winger Sean Russell to get in a shot again blocked by Murphy. Then a Paul Corry cross from the right was narrowly headed wide by central defender David O’Connor as College started to up the pressure.
And Martin Russell’s young side were desperately unlucky not to take the lead on 67 minutes when a long clearance by keeper Barron allowed lone striker Samir Belhout to sprint past the Dundalk defence only to see his effort rebound off the upright.
The Students were to regret that miss when Dundalk took the lead on 72 minutes. A dangerous low cross by Gaynor on the left was fired home from close range by striker Mark Griffin.
Griffin was to repeat his scoring expertise in added time when shooting home from four yards after a free by substitute Keith Ward had rebounded off the woodwork.
UCD: Barron; Harding, D.O’Connor, Leahy, Nangle; Marshall, Corry, P.O’Conor, Meenan, Russell (Benson 60), Belhout (Doyle 77).
DUNDALK:Cherrie; Madden, Hawkins, Hector, Murphy; Kearns, Bennett (Ward 62), Bolger, Gaynor; Griffin, Quigley.
Referee:A Buttimer (Cork).