Media playback is not supported on this device
Unseeded Puig, 22, beat the German world number two 6-4 4-6 6-1.
Reigning Australian Open champion Kerber, 28, simply could not match the intensity of her younger opponent in the deciding set.
Earlier, Petra Kvitova of Czech Republic beat USA's Madison Keys in three sets 7-5 2-6 6-2 to win bronze.
"It's just amazing," said Puig. "I know my country really appreciates this and I wanted to give it to them. The way that I did it tonight, I wouldn't want it any other way."
Puig, who was born in Puerto Rico but raised in Miami, added: "I always have been 100% loyal to where I was born and the roots I was raised in.
"I still have family in Puerto Rico and I have been back to visit quite a lot. I think it honestly is my favourite place to go when I want to go to the beach or see family.
"That island has given me so much. So much love and support throughout my career and I just wanted this one for them."
There will be a fifth Olympic medal for Venus Williams after the 36-year-old reached the mixed doubles final with Rajeev Ram.
Williams, the singles champion in Sydney in 2000 and winner of three doubles golds with sister Serena, made early exits from the singles and women's doubles.
But Williams and Ram defeated India's Rohan Bopanna and Sania Mirza in the mixed semi-finals, and will play fellow Americans Jack Sock and Bethanie Mattek-Sands for gold.
Subscribe to the BBC Sport newsletter to get our pick of news, features and video sent to your inbox.
Monica Puig beat Angelique Kerber in three sets in the women's singles final to win Puerto Rico's first ever Olympic gold medal.