Griffiths at the double for Hibs
Andy Kirk opened the scoring for Dunfermline after 13 minutes but Griffiths levelled 12 minutes before half-time.
Substitute Garry O'Connor put Hibernian ahead after 75 minutes before Liam Buchanan levelled the match again with eight minutes remaining.
But the home side were dealt a devastating blow only a minute later when a rapid Hibs breakaway ended with Griffiths' shot slipping through the hands of Iain Turner.
Defeat left Dunfermline four points adrift of their opponents at the foot of the table.
Backed by an impressive travelling support Hibernian made a bright start and Iain Turner had an early first touch on his debut as he gathered Griffiths' long-range shot after 30 seconds.
Dunfermline's first opportunity of the match fell to Martin Hardie but his free-kick was a yard wide of the target.
The best chance of the opening 10 minutes fell to Hibernian full-back Callum Booth who linked well with Ivan Sproule before unleashing a stinging effort which Turner did well to turn behind for a corner.
Dunfermline grabbed the opening goal after 13 minutes, when Kirk nodded home from six yards out after an excellent delivery from Joe Cardle.
Hardie had another opportunity from a set-piece after 21 minutes but Mark Brown made an excellent low stop.
After a period of sustained pressure Hibernian levelled the match as Griffiths latched on to David Stephens' header and calmly slotted beyond Turner.
David Graham had an opportunity to restore Dunfermline's lead five minutes later but he blazed wide after Hibs had failed to deal with a Cardle corner.
Chances were limited in a frantic start to the second half. Gary Mason shot high over the bar for Dunfermline while Sproule's misplaced pass in a promising position prevented the visitors threatening Turner's goal.
Just before the hour mark Isaiah Osbourne forced an excellent diving stop from Turner and a minute later the former Scotland Under-21 stopper had to be alert to Griffiths' long-range drive.
The introduction of O'Connor after 60 minutes added an extra threat to the visitors' attack and Osbourne picked out Sproule who should have done better with his header at the back post.
Good work by Paul Willis led to Cardle forcing Brown into an excellent stop but the hosts fell behind only a minute later.
Griffiths laid the ball inside to O'Connor who fired the ball beyond the helpless Turner.
After falling behind the hosts upped the pressure on the Hibernian defence and only Booth's goal-line clearance prevented Hardie equalising.
With eight minutes remaining Dunfermline's pressure paid off as they levelled the game.
The Hibs defence failed to deal with Hardie's free-kick and Buchanan was on hand to blast the ball low into the bottom right-hand corner.
Following their deserved equaliser the hosts were dealt a devastating blow when a rapid Hibernian breakaway ended with Griffiths' shot slipping through Turner's grasp and into the net.
Dunfermline searched for their second equaliser of the match and were almost handed a gift when Brown failed to handle Cardle's shot but Stephens was on hand to save the keeper's blushes.