UCD led for long spells, with three points each from John Heslin and Conor McCarthy putting them 0-6 to 0-4 ahead at half-time.
A Luke Kelly goal early in the second half saw them go six points clear before Jamie Farrell hit back for Laois with a brilliant finish to the bottom corner.
The rest of the half was close until O’Connor escaped his marker 30 yards out to point in the 73rd minute to secure victory.
D Kingston 0-4f, J Farrell 1-0, K Meaney 0-2, R O’Connor, N Murphy, J O’Loughlin, A Farrell 0-1 each.
J Heslin 0-4f, C McCarthy 0-3 (1f), L Kelly 1-0, R Carr (f), F Andrews 0-1 each.
G Brody; P Cotter, M Timmons, T Collins; A Farrell, D Strong, T Connolly; J Farrell, J O’Loughlin; N Murphy, D Kingston, D O’Connor; E Costello, G Walsh, C Murphy.
P Cahillane for C Murphy (ht), G Dillon for Connolly (ht), D O’Reilly for D O’Connor (ht), M Scully for N Murphy (43), K Meaney for Walsh (54), R O’Connor for Costello (54).
E Keogh; S Mulvany, M Fitzsimons, N McInerney; N O’Reilly, E Nolan, M Cahalan; J Barry, B O’Sullivan; F Andrews, C McCarthy, D Fitzpatrick; R Carr, J Heslin, L Kelly.
R McDaid for Nolan (24, inj), D Murphy for O’Sullivan (43), P Mannion for Heslin (47), B Byrne for Cahalan (47), E O’Byrne for McCarthy (52), D Byrne for O’Reilly (66).
P Maguire (Longford).