When 3-0 behind at Kilmarnock last month, Neil Lennon surely could not have envisaged this scenario. To the Celtic manager's credit, he has presided over a mini fightback in the Scottish Premier League title race. More work is required and Celtic will face better opposition than Dunfermline for much of the season. Another home win, when St Mirren visit Celtic Park on Saturday, will narrow Rangers' advantage at the top to four points before the defending champions make their own visit to Kilmarnock. Celtic and Lennon have scrambled to the extent where things are interesting again.

The closing momentsof this game seemed a bit unnecessary for Celtic, who dominated completely until Andrew Barrowman handed Dunfermline a lifeline. Earlier, Ki Sung-yueng had become the latest Celtic player to miss a penalty – thereby keeping Dunfermline in the contest. At full-time, Lennon had a minor set-to with a section of the Celtic support who he felt had been overly negative towards the team.

"They just annoyed me," Lennon said. "I can understand their frustration but we are in a title battle here and need all the support we can get. People will talk about the last three or four minutes but we created umpteen not half, but clear-cut chances. The only criticism I have is that we didn't put the game away."

Lennon said a plan to bring Gordon Strachan back to Celtic in an advisory capacity had failed eight weeks ago. "Gordon is someone I respect totally and he wasn't averse to the idea but it never materialised," the manager said. For now, Celtic's touch is such that Lennon does not seem to need an experienced hand alongside him.

On paper, Dunfermline were favourable opposition for Celtic. The newly promoted team arrived in Glasgow having conceded 29 goals in 14 league outings. Only financial warnings and cutbacks, ominously for a club who should be profiting from new-found SPL funding, have masked Dunfermline's defensive troubles.

Within 13 minutes, that generosity was highlighted. A stray pass from the visitors' Paul Willis fell to the feet of Gary Hooper, who lashed a low finish past Paul Gallacher.

Celtic's early-season league woes owed plenty to an inability to see off inferior teams at home. St Johnstone and Hibernian have left this venue with SPL reward but Dunfermline never genuinely looked likely to join that club. Lennon had dropped Georgios Samaras and Badr El Kaddouri to the substitutes' bench, perhaps an admission that the Celtic display during Saturday's win in Inverness had not entirely pleased their manager. Either way, an early sense of freshness was evident here.

James Forrest notched the hosts' second. Gallacher parried an Anthony Stokes shot to the feet of Hooper, who sensibly laid the ball back to his young team-mate.

Still, a scare for Celtic followed. Daniel Majstorovic was fortunate not to concede a penalty after clambering all over Ryan Thomson. That may have jolted Lennon's team, for whom Kris Commons and Stokes wasted fine chances before the interval. "We were lucky to come in 2-0 down," Jim McIntyre, the Dunfermline manager, said.

Eleven minutes after the restart, Celtic's victory should have been secured. Instead, Ki dragged his penalty wide after Paul Burns upended Forrest – outside the area, Dunfermline claimed. Stokes appeared more vexed than Ki, having wanted to take the spot-kick.

Ki looked to make amends by playing in Stokes, half an hour from time, but the Irishman shot against a post.

Dunfermline's best spell of the match followed, although proceedings had regressed into something of a nonevent. A Joe Cardle attempt that forced the Celtic goalkeeper Fraser Forster to bat away at his near post highlighted a fall in the home side's tempo. Barrowman went one better, with a fine shot which reduced Celtic's advantage. Crucially for Lennon, no further and meaningful damage was inflicted upon his team.