He wrote dozens of hits over two decades, including The Loco-Motion, Will You Love Me Tomorrow and (You Make Me Feel Like) A Natural Woman.
He was inducted, along with King, into the Rock and Roll Hall of Fame in 1990.
In a statement, King said Goffin was her “first love” and had a “profound impact” on her life.
“His words expressed what so many people were feeling but didn’t know how to say.”
Born in the New York city borough of Brooklyn in 1939, Goffin married King when he was 20 and she was 17. They had their first hit, Will You Love Me Tomorrow, sung by the Shirelles, shortly afterwards.
After their divorce in 1968, Goffin continued writing songs, including a hit for Whitney Houston, Saving All My Love for You, in 1985.
He is survived by his wife, Michelle Goffin, who confirmed he died from natural causes. He had five children and six grandchildren.
A statement from the Recording Academy, which presented him and King with a Trustees Award in 2004, called Goffin a “legendary songwriter” and “profound lyricist”.
“His prolific career has left an indelible mark on our culture, and his exceptional legacy will continue to teach and inspire many generations to come,” said Neil Portnow, the Recording Academy’s president.
“Our music community has truly lost one of its finest, and our deepest sympathies go out to his family, his friends, and all who have benefited from and have been moved by his extraordinary and heartfelt talent.”
‘A dynamic force’
Goffin was behind dozens of top 40 hits during his career and co-wrote seven songs that topped the US charts, including Diana Ross’ Theme From Mahogany (Do You Know Where You’re Going To?).
He also co-wrote Up On The Roof, Monkees’ track Pleasant Valley Sunday, the Everly Brothers’ Crying in the Rain, Bobby Vee’s Take Good Care of My Baby, Gladys Knight and the Pips’ track I’ve Got to Use My Imagination and James Taylor’s You’ve Got a Friend.
He also hired singer Kelly Clarkson to sing on some of his demos in 1995, before she was on American Idol.
He and King divorced in 1968, after having two children including singer-songwriter Louise Goffin. Their story is told in hit Broadway musical Beautiful: The Carole King Story, which won two Tony Awards this year.
King, who backed the project which was also produced by one of their daughters, only sat through the show in April, having avoided seeing it for months after it opened because it dredged up sad memories.
The musical shows them composing their songs at the Brill Building publishing company in Manhattan that also employed Neil Sedaka and Howard Greenfield.
“Gerry was a good man and a dynamic force, whose words and creative influence will resonate for generations to come,” said King.
“His legacy to me is our two daughters, four grandchildren, and our songs that have touched millions and millions of people, as well as a lifelong friendship.”
She added: “If you want to join his loved ones in honouring him, look at the names of the songwriters under the titles of songs. Among the titles associated with me, you’ll often find Gerry’s name next to mine.”
Goffin, whose final album Back Room Blood was released in 1996, was working as an assistant chemist when he met King at Queens College.
He told Vanity Fair in 2001: “She was interested in writing rock and roll, and I was interested in writing this Broadway play.
“So we had an agreement where she would write (music) to the play if I would write (lyrics) to some of her rock and roll melodies. And eventually it came to be a boy-and-girl relationship.
“Eventually I began to lose heart in my play, and we stuck to writing rock and roll.”
Goffin struggled with mental health problems during their marriage and at one point King made a decision to admit him for shock therapy, an experience she talks about in her memoir A Natural Woman.
His daughter Louise said her dad “wore his heart on his sleeve, and I am deeply blessed to have had a father who could so easily make the world laugh and cry with just a spiral notebook and a pen.”
Composer and pianist Barry Goldberg, who wrote many later songs with Goffin, has also paid tribute.
“Gerry was one of the greatest lyricists of all time and my true soul brother,” he said.
“I was privileged to have had him in my personal and professional life.”