The former Republic of Ireland striker nodded in 13 minutes from time to give the U's a first win in seven games, stopping the rot to reignite their promotion hopes.
It was a result which had been in doubt for most of the evening as the hosts struggled to carve out clear chances.
But a red card for Simon Walton gave United belief and Connolly quickly notched his fourth goal for the club.
James Constable and Alfie Potter both had clear chances to seal the victory, but their profligacy did not prove costly.
In his 12th game in control, Lewis made six changes to the side which started the 3-0 defeat at Chesterfield last Saturday.
Youngsters Matt Bevans and Sam Long came into a makeshift back four, replacing the suspended Michael Raynes and Tom Newey, with David Hunt switching to left back.
David Connolly celebrates with his teamates after scoring United’s late winner last night
Andy Whing made his first appearance since November, in for the injured Johnny Mullins, while Sean Rigg came in on the left flank.
Up front Constable partnered Connolly, as Danny Rose, Potter and Deane Smalley dropped to the bench.
The home fans, perhaps buoyed by the impending managerial news which emerged before kick-off, lifted the mood from the beginning.
United responded and they had the best of the opening 20 minutes.
The hosts did not look like a side struggling for confidence and quickly had Hartlepool on the back foot.
Ryan Williams got supporters off their seats with a smart turn and 50-yard run deep into opposition territory on 11 minutes.
He fed Rigg, whose trickery opened half a yard of space to cross low for Constable, who missed his kick 12 yards out.
The striker quickly made amends, intercepting a weak clearance to find Connolly inside the box.
It was an acute angle for the veteran, whose instant shot struck the woodwork and ricocheted off goalkeeper Scott Flinders and out for a corner.
From the set piece Whing headed wide, before punching the turf in frustration.
But United quickly lost their way and were forced into a change eight minutes before the break when Williams hobbled off, replaced by Potter.
Aside from a Luke James snap shot, the visitors had rarely threatened, but they came into the game in the closing minutes of the half.
One spell saw them force four successive corners, which saw Ryan Clarke tip over a header from Christian Burgess, and the goalkeeper also turned a Jack Barmby shot round the post on the stroke of half-time.
A weak header from Long put Clarke in trouble in the opening minute of the second half. It almost gifted a goal to James, but the young defender recovered in time to clear.
United swiftly went up the other end and had a strong call for a penalty when Rigg was sent sprawling.
But to the astonishment of the home players, and many of their fans, referee Andy Davies shook his head and waved play on.
Hartlepool United’s Simon Walton (centre) is shown the red card by Hampshire referee Andy Davies
A set piece looked United's best hope of finding a breakthrough as they struggled for creativity in open play.
Ruffels stung Flinders' fingers with a free-kick from long range and as the minutes ticked by it began to look like a frustrating night.
But the game changed 16 minutes from time when Walton was dismissed for picking up two bookings, both for late tackles on Rigg.
The winger won another free-kick a minute later on the left flank.
Hunt whipped in the delivery and found Connolly, who headed into the corner of the net.
There was relief all round and the experienced striker quickly sent Constable through one-on-one to kill the game, but Flinders stood up and blocked smartly.
Potter had a similar opening in the 90th minute, again from a Connolly pass, which the winger blazed over.
It was very nearly costly for the hosts, as James had two sights of goal in stoppage time which he fired wide to let United off the hook as Lewis signed off on a high.
Oxford Utd (4-4-2): Clarke, Bevans, Long, Wright, Hunt, Williams, Whing, Ruffels, Rigg, Constable, Connolly.
Subs used: Potter (Williams 37), Smalley (Constable 90).
Unused subs: Crocombe, Rose, Davies, O'Dowda, Wroe.
Hartlepool Utd (4-4-2): Flinders, Richards, Collins, Burgess, Holden (Poole 86), Walker, Walton, Barmby (Franks 83), Compton (Sweeney 78), James, Harewood.
Unused subs: Rafferty, Rowbotham, Duckworth, Hawkins.
Booked: Richards, Walton
Sent off: Walton
Referee: Andy Davies (Hampshire).
Attendance: 4,954 (185 visitors).