UCD's hopes of staying in the Premier Division received a double boost on Saturday night as they extended their unbeaten run to eight games in Ballybofey while at the same time Derry City were surprisingly beaten by already relegated Kilkenny.
Harps, who are still not safe, took the lead with a spectacular 30-yard strike from Stuart Gauld in the 20th minute. But the visitors always looked the more impressive and deservedly equalised 12 minutes later when Robert Griffin headed home a free.
Ciaran Kavanagh scored what proved to be the winner just after the break when he capitalised on an error by Declan Boyle to tuck the ball past Jody Byrne.
Finn Harps: Byrne, T Callaghan, Minnock, Boyle, Bradley, O'Brien, Cullen, McGettigan, Dowling, Mulligan, Gauld. Subs: McGrenaghan for O'Brien (43 mins), Vaudequin for Cullen (61 mins), G Callaghan for T Callaghan (80 mins).
UCD: Kelly, McLoughlin, Fitzgerald, Delaney, McDonnell, Lynch, Kavanagh, Bolger, Sherlock, O'Byrne, Griffin. Sub: Martyn for Bolger (77 mins).
Referee: E Barr (Dublin).