Attorney Marvin Gittler, who fought for unions and workers with power, intelligence and wit in some of Chicago’s biggest, toughest labor-management battles, died Thursday morning at 77.

He represented organized labor for half a century, including the Teamsters, the building trades and Chicago cops. In the early 1980s, Mr. Gittler helped negotiate the historic first contract between the city and the police, giving officers the right to overtime and establishing due process in internal investigations and arbitration for grievances, according to his law partner, Joel A. D’Alba.

“He was an enormous presence,” said a frequent legal opponent and good friend, attorney James C. Franczek Jr. “He was charming, bright, bold. He captured a room when he walked into it, but he was also incredibly committed to his clients. It’s the passing of one of the true legends of labor law in Chicago.” Franczek first faced off against Mr. Gittler in the 1970s when doctors and nurses went on strike at the old Cook County Hospital.

“He was the go-to guy for Chicago unions,” D’Alba said. “He could take a very complex problem, reduce it through wit and make sense of it for hardworking people and unions.”

Once the negotiating was done, opposing lawyers “would come up to him afterward and say, ‘It was great working with you,’ ’’ D’Alba said. “He trained us to be respectful of the lawyers we worked against.”

“Regardless of which side you were on, he was always collegial, civil, and frequently, downright funny,” said attorney Lawrence Weiner of the firm of Laner, Muchin.

And Mr. Gittler never lost touch with working people, D’Alba said: “He understood what people had to pay for a gallon of milk.”

He died at his home in Union Pier, Michigan, of complications from lung cancer and dementia, said his daughter, Dr. Michelle Gittler.

A native New Yorker, Marvin Gittler studied at Syracuse University and attended law school at the University of Chicago. As a young man, he gained insight into labor issues when he worked as a banquet hall waiter in big hotels.

At Syracuse, he met Carol Spear, his wife of 56 years. They raised five daughters in Hyde Park. “Other families play sports, soccer,” his daughter said. “We played arguing at the dinner table,” where they debated ethical issues and current events.

Mr. Gittler started his career at the National Labor Relations Board. Later, he worked on behalf of the Illinois AFL-CIO. He represented many locals of the Teamsters union, including during times the city sought concessions designed to entice trade shows to Chicago. And Mr. Gittler was longtime counsel for Teamsters Joint Council 25, which represents workers throughout the city, Illinois and northwest Indiana.

He put together the first collective bargaining unit for Chicago Police Department sergeants, lieutenants and captains, D’Alba said, and, in 1986, he helped win a $2.7 million settlement for 488 retired police officers who had been forced to leave the department at 63 in violation of federal age-discrimination laws.

In the late 1980s, Mr. Gittler, who represented Mailers Union No. 2, stopped his home delivery of the Chicago Tribune because of the newspaper’s tactics in disputes with production workers.

In a measure of his charm, he often drew smiles while visiting Franczek’s office to negotiate labor agreements. He would slip a union card to Franczek’s secretary and offer to be her representative.

“I had the privilege of working with him on a number of Bar Association committees and programs, and I loved to hear his deep voice ringing out with conviction concerning principle, outrage at injustice, or pleasure with friends,” said John E. Sands, a labor arbitrator in Roseland, New Jersey.

His clients also included the roofers, carpenters, electricians, bricklayers and others in the Chicago and Cook County Building Trades & Construction Council. At the Chicago Board of Education, he represented custodial staffers and stationary engineers. And he worked for SEIU Local 1 and SEIU Local 783, whose members clean offices and public buildings. In 2015, he helped negotiate a settlement in the Chicago Symphony Orchestra musicians strike.

Mr. Gittler enjoyed spending time at his summer home in Union Pier, where he built swings and dollhouses for his grandchildren. He sometimes shared Passover dinners with Mayor Rahm Emanuel and his family at the home of Michelle Gittler, a Ravenswood neighbor of the mayor. “There would be my dad, singing union songs, because he believed the Exodus was the first organized strike,” she said.

He also is survived by his other daughters, Susie Wexler, Dr. Mandy Gittler and Debra Gittler; a sister, Phyllis Robinson; a brother, Lou; a stepbrother, David; and eight grandchildren. Another daughter, Caryn, died in a 1992 car accident. A private graveside service is scheduled for Friday. A celebration of Mr. Gittler’s life will be held at a later date.