Lewis Martin scored with virtually the last kick of the ball to deny us our first home League 1 win of the season.
Allan Smith fired the Pars ahead just before half-time – four minutes after Lewis Coult had been sent off by referee Crawford Allan for what was deemed to be a dangerous tackle on Martin.
Captain Chris Smith headed the equaliser from a Craig Comrie corner on the hour mark and fellow central defender Craig Wedderburn scrambled home the second goal from close range with 11 minutes left.
We were set for a vital and deserved win until Martin blasted the ball home following a corner two minutes into stoppage time to break Albion hearts.
Binos boss Stuart McLaren made just one change to the team that beat Stenhousemuir the previous week, with Coult in for Lewis Small, who has returned to Falkirk after his loan spell was cut short due to injury.
There was a welcome return to the squad for Ross Forsyth and new loan signing, Falkirk striker Scott Shepherd, was also listed among the subs. Darren Lee Smith, Steven Doris and Graham Weir remain on the injury list.
Dunfermline, who arrived at Forthbank on the back of just two wins in nine matches, gave a debut to former Forfar full-back Jim Paterson.
The visitors missed a couple of good early chances and there was another escape when Shaun Byrne lashed a shot narrowly over but we threatened through a Phil Johnston drive that was well saved by Ryan Scully and a Ross McGeachie header that was cleared off the line.
Coult’s red card came in 38 minutes when he lunged in on Martin and Dunfermline soon took advantage – young striker Smith got in behind the defence and squeezed a low shot past Greg Paterson.
Stirling’s second-half performance was exceptional and you would never have known we were a man short. The attacking, passing football under McLaren has deserved a greater haul of points and it so nearly resulted in a memorable win here.
Chris Smith equalised on the hour mark with a precise header from Comrie’s corner for his second goal of the season – the other was at Hurlford in the Scottish Cup.
An unlikely comeback then looked to be completed by another unlikely scorer when Wedderburn did well to force the ball in from close range after Scully had been unable to hold on to a whipped free-kick from Angus Beith.
Shepherd had a glorious opportunity to seal the victory with a debut goal when sent clean through but Scully made a vital save.
When we survived an incredible scramble in stoppage time, a first win over the Pars since 2007 was looming but right at the end, and with keeper Scully forward for a corner, Scotland U19 defender Martin rescued a point for John Potter’s team.
Ahead of Saturday’s trip to Peterhead, we have closed the gap on second-bottom Ayr to four points while Dunfermline drop out of the top four.
Stirling Albion: Paterson, McGeachie, Creaney, Beith, Wedderburn, C Smith, Johnston (Hamilton 83), Comrie, Coult, G Smith (Forsyth 90), Cunningham (Shepherd 67). Subs (not used): Fulton, Robertson, McClune, Reidford (GK).
Scorers: C Smith 60, Wedderburn 79
Dunfermline Athletic: Scully, Millen, Paterson, Martin, Buchanan, Spence (Thomson 80), Falkingham, Byrne, Moffat (El Bakhtaoui 74), Smith, Forbes (Stirling 63).
Subs (not used): O’Kane, Graham, Mercer, Gill (GK).
Scorers: Smith 42, Martin 90
Referee: Crawford Allan