Gelbart was born in Chicago, Illinois, to Jewish immigrants Harry Gelbart, "a barber since his half of a childhood in Latvia,"[2] and Frieda Sturner, who migrated to America from Dąbrowa Górnicza, Poland. Marcia Gelbart Walkenstein was his sister.

In 1972, Gelbart was one of the main forces behind the creation of the television series M*A*S*H, writing the pilot (for which he received a "Developed for Television by __" credit); then producing, often writing and occasionally directing the series for its first four seasons, from 1972 to 1976. M*A*S*H earned Gelbart a Peabody Award and an Emmy for Outstanding Comedy Series and went on to considerable commercial and critical success.

Gelbart's best known screen work is perhaps the screenplay for 1982's Tootsie, which he co-wrote with Murray Schisgal. He was nominated for an Academy Award for that script, and also was Oscar-nominated for his original screenplay for 1977's Oh, God! starring John Denver and George Burns. On his relationship with actor Dustin Hoffman in Tootsie, Gelbart is reported to have said, "Never get involved in a film where the Oscar-winning star is smaller than the statuette." He later retracted this statement, saying that it was just a joke.

Gelbart was diagnosed with cancer in June and died at his Beverly Hills home on September 11, 2009. His wife of 53 years, Pat Gelbart, said that after being married for so long, "we finished each other's sentences." She declined to specify the type of cancer he had.[1][9] He was buried at the Hillside Memorial Park Cemetery in Culver City, California.[10]