Griffiths had passed up a gilt-edged opportunity earlier in the game, when he fired off the crossbar from inside the six-yard area with the goal gaping.
The Celtic striker was forced off early in the second half with a back injury, rendering him unable to atone for the miss.
Martin was introduced with eight minutes remaining as he replaced James Morrison. Even though he was booed by the Hampden crowd as he took to the field, the striker would fire in the winner with two minutes remaining.
After the match, Griffiths thanked the Fulham striker for his winning strike.
He wrote: “Delighted big Chris pulled me out a hole, I should be scoring chances inside 6 yard box! Delighted for the fans who made the journey!”