NEW YORK — Gary David Goldberg — a writer and producer who created warm-hearted television shows, most notably “Family Ties,” a leading comedy of the 1980s that propelled Michael J. Fox to stardom — died Saturday at his home in Montecito, Calif. He was 68.

Mr. Goldberg came to writing relatively late, after a peripatetic young adulthood in the 1960s and early ’70s that involved dropping out of colleges, waiting on tables in Greenwich Village, hitchhiking around the world with the girlfriend who would become his wife, and starting a day-care center with her in Northern California.

The rebellious flower child sensibility that informed these adventures was the spur for “Family Ties,” which captured the culture clash between parents of the hippie generation and children growing up during the Reagan administration.

The show, broadcast on NBC from 1982 to 1989, was set in a suburban neighborhood of Columbus, Ohio, and focused on the Keatons: Steven and Elyse (Michael Gross and Meredith Baxter Birney) and their children Alex (Fox), a bright, earnest young Republican with a hunger for wealth; the fashion-obsessed Mallory (Justine Bateman); and Jennifer (Tina Yothers), the intellectually precocious little sister. (In later seasons, after Baxter Birney’s pregnancy was incorporated into the show, the family added a fourth child, Andrew, played by Brian Bonsall.)

The pilot episode opened with the Keatons in their living room watching home movies of Steven and Elyse at a demonstration against the Vietnam War.

“That was history in the making,” Elyse explains. “There were people from every state in the union at that protest.”

Originally meant to focus on the parents, whom Mr. Goldberg acknowledged were based on him and his wife, the show became a vehicle for Fox, who was 21 when the show started. He soon earned the central role in the hit 1985 film “Back to the Future.”

Fox was not the first choice for the “Family Ties” role — Matthew Broderick was — and even after his audition Mr. Goldberg did not want him for the part. It was only after the casting director, Judith Weiner, pestered Mr. Goldberg to see Fox again that the match was made.

“From that point on he was a tireless defender of me,” Fox said in a recent interview.

As Fox became central to “Family Ties,” it began dealing more with teenage issues than with parental ones. Some were serious; one Emmy-winning episode had Alex going to a psychiatrist after a friend was killed in a car crash. But what made the show a success was that the differences among the Keatons were settled in a loving manner; like the Huxtables of “The Cosby Show,” which came along two seasons later, they were a happy family.

“I was interested in the dynamic of a couple that had been together long term, that were still very physically active and attracted to each other, a house where there was romance and where the parents’ relationship to the kids reflected expanded lanes of communication and represented the way families were changing,” Mr. Goldberg said in a 2007 interview for the Archive of American Television.

Mr. Goldberg created other shows after “Family Ties,” most notably “Brooklyn Bridge,” an homage to his childhood that lasted two seasons in the early 1990s; and “Spin City,” created with Bill Lawrence, which reunited him with Fox, who played the chief of staff to a dim-witted mayor of New York.

Mr. Goldberg also produced the feature films “Dad” (1989), about a father-son reconciliation that starred Jack Lemmon and Ted Danson; “Bye Bye Love” (1995) with Paul Reiser, Matthew Modine, and Randy Quaid as divorced men; and “Must Love Dogs” (2005), a romantic comedy with Diane Lane and John Cusack.

Mr. Goldberg and Meehan married in 1990. Besides his daughter Silveri, he leaves his wife, his brother, another daughter, Cailin Goldberg Meehan, and three grandchildren.

“Gary is one of those guys who has no guile in him,” Fox said shortly before Mr. Goldberg’s death. “His work is a celebration, of life, of relationships, of small family moments.’’

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.

Thanks & Welcome to Globe.com

You now have unlimited access for the next two weeks.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.