The American teenager, competing in a record seven events in her first Olympics, overhauled Australia's Emily Seebohm in the final few strokes to get her hand on the wall first in a time of 58.33 seconds.
Incredibly, Franklin had just swum in the semi-finals of the 200 freestyle less than 20 minutes earlier and qualified eighth for the final.
Seebohm, who led at the turn under world record pace, held on to take silver while Japan's Aya Terakawa was third.
Seebohm came agonisingly close to breaking the world record when she won her heat in 58.23 seconds, just 0.11 outside the mark set by Britain's Spofforth at the 2009 world championships in Rome, then topped the semi-finals but was unable to repeat her performance in the final.
Franklin, the rising talent of the American women's team, now has two medal from two events after winning a relay bronze on the opening night.
Spofforth was philosophical after the fifth-placed finish, saying: “I gave that everything. It’s the journey and not the destination.
“At time of crisis, there’s always light at the end of the tunnel, I’m really enjoying it.
"I’ve started enjoying life again, I have a passion and want to do everything. This is just a speed bump in the road.
“I came away a little disappointed but I have said all along that for me it's about finding something I am really passionate about.
“One year ago I was ready to quit swimming so to get fifth is really special to me."
"I am planning to climb Everest. I started climbing this year, started loving it. It will probably take at least five years.
“Working with the kids at home, I can say to them that I’ve been in an Olympic final.”
- Related links