Replacements: Sean McNulty, Rory Harrison, Gordon Frayne, Donagh Lawler, Bobby Holland, James Murray, Adam Byrne.
Replacements: Conor Lowndes, David Clarke, Matt Dever, Ja Naughton, Conor Muldoon, Matthew Towey, Jordan Healy.
UCD, who were playing in their new all-black away strip, struggled to settle into the usual rhythm, but with Jordan Coghlan and Tom Fletcher providing a strong presence in their backs division, they soon improved.
In a very physical encounter, the Division 2A leaders kept UCD at bay with some committed defensive work before they leaked an 18th minute penalty which James Thornton converted from 30 metres out.
In a game of this nature, every score was going to be vital and Galwegians had a three-point opportunity of their own just four minutes after Thornton's opener.
'Wegians number 10 Ross Shaughnessy was narrowly off target with his strike from an awkward angle on this occasion, but he made no mistake with his second effort on goal 25 minutes in.
The students then seized the initiative with 12 minutes left before the break, their scrum half Jamie Glynn breaking free from an enterprising maul and driving over for the opening try to the left of the posts.
Thornton added a superb conversion, although Shaughnessy's 32nd minute penalty ensured that the Galway club remained well in contention as half-time approached.
They applied considerable pressure in the UCD 22 late on and even though the hosts coped well with their probing attacks, Galwegians' persistence eventually paid off when left winger Ronan Moore crossed the whitewash at the end of a fine team move in injury-time.
This was a strong show of intent from Cory Brown's side and with Shaughnessy splitting the posts brilliantly from the left touchline, they brought a 13-10 cushion into the second half.
Galwegians' confidence level were understandably high following their strong finish to the first half, and after 53 minutes they looked set to move even further into the ascendancy.
However, Shaughnessy's fourth attempt on goal dropped well short and this latest let-off helped to spark UCD back into life.
Full-back Fletcher and centre Alex Kelly built the foundations on the right flank and after also involving right winger Barry Daly in an incisive attack, Kelly's neat lay-off saw Fletcher finish off the students' second try.
Thornton was unfortunate to see his conversion attempt get caught up in the wind, but he brought his personal tally to eight points when a long range penalty sailed between the posts.
Another three-pointer from the ever-dependable out-half in the 78th minute offered UCD what looked like an insurmountable eight-point lead, but a gutsy Galwegians continued to battle until the bitter end.
In fact, after an extended period of play, they got the score that their efforts deserved when replacement Conor Muldoon crossed the whitewash past the 80-minute mark.
Winger Ciaran Gaffney tagged on the conversion for good measure, but it proved to be too little, too late as UCD booked their place in the decider which will take place over the weekend of April 26-27.
Referee: Nigel Correll (IRFU)