The start of play was delayed for almost three hours for the second day running, with the marquee group of McIlroy, Jordan Spieth and Rickie Fowler having five holes left to play in their second round.
McIlroy had been one over par for 13 holes on Friday and looked set for more frustration after missing early birdie chances, but then almost holed his approach to the last two holes to leave tap-ins for a birdie and an eagle.
"I needed that," McIlroy said after signing for a 70 to finish eight under par, two behind clubhouse leader Andy Sullivan. "I could not hole a putt from outside two feet so I thought I would hit a couple inside two feet.
"I said to JP (Fitzgerald, his caddie) on the 17th tee 'Let's finish three', three so I don't know if I should say I need 18 threes on the first tee. I knew 18 was a good chance and 17 was downwind so I'd be going in with a wedge, but I didn't quite expect to do what I did on 18. That was nice.
"It glossed over a pretty average round to be fair. But when you are not at your best, to be able to come away with a 70 and keep in touch with the leaders, I'm happy with that."
McIlroy, whose 268-yard five-wood approach to the 18th appeared to graze the edge of the hole, added: "I've never had an albatross and my dad's had one or two so that would have been nice."