A Shane Guthrie brace sent St Pat's back to the top of the Airtricity League Premier Division table at a wet Richmond Park.
Guthrie put Pat's ahead with a diving header on 17 minutes after College failed to clear Brian Cash's corner.
The Students equalised on 23 minutes when Chris Mulhall shot low past Pat's keeper Gary Rogers and into the bottom right of the net after Derek Pender had blocked an initial shot from Graham Rusk. But Guthrie popped up on 81 to head in the winner.
Conditions for this south Dublin derby were atrocious due to the heavy rain that began falling in the capital in late afternoon. It was still coming down as the game kicked off and left the surface very slippy and greasy.
Indeed, circumstances didn't help Saints' Paul Byrne after just 60 seconds when he got on the end of a Cash pass but couldn't keep his footing and shot wide of Billy Brennan's post from the left of the box.
Following a series of Pat's attempts on goal, the home side went ahead on 17 minutes when Brennan failed to claim Cash's corner from the left and giant centre back Guthrie's diving header crashed into the back of the net.
College fought back and were full value for their leveller just six minutes later. Mulhall shot low past Rogers and into the bottom right of the net after Derek Pender had blocked that initial shot from Rusk, all following Dwayne Wilson's solo run and cross.
UCD finished the half with a flurry and Rogers made a vital save on 45 minutes when Andy Boyle got the faintest of touches on Paul Corry's free-kick.
The rain was still pelting down on Dublin 8 as the second half started but it didn't affect either side, both of whom saw a lot of the ball.
On 54 minutes Corry fed Ciaran Kilduff in the danger area but Kilduff couldn't turn in time to get a clean shot on target. One minute later at the other end Ryan Guy crossed a teasing ball into the UCD box but the inrushing Byrne missed the ball by inches.
Then Brennan tipped Cash's curling shot from the right of the box over the bar.
Sub Sean Harding went close for UCD with a fierce drive at the Inchicore-end but dragged his shot wide of Rogers' right hand post.
On 73, Rogers made a good block from Robbie Creevy's long range shot.
A lull then developed for a short spell but the game sprang to life again when Guthrie headed Pat's in front on 81 minutes.
UCD failed to clear from Guy's corner and the ball came to the former Galway United and Cobh Ramblers man at the far corner and he made no mistake as he powered the ball into the top corner.
The game ended on a sour note for Pat's though as captain Damien Lynch was carried off suffering from a leg injury right at the death.