In Chicago, Philadelphia, Los Angeles and other cities, Democratic mayors have feuded bitterly with teachers’ unions and at times come to see them as enemies. And at a meeting of the United States Conference of Mayors in June, Democratic mayors joined Republican ones in a unanimous endorsement of so-called parent trigger legislation, about which unions have serious reservations. These laws, recently passed in only a few states but being considered in more, abet parent takeovers of underperforming schools, which may then be replaced with charter schools run by private entities. Parent trigger hasn’t yet led to a new school, so no one can really know the sense or efficacy of the scenario. But it informs “Won’t Back Down,” which envisions Gyllenhaal’s trigger-pulling parent as an Erin Brockovich of education.

“It gives parents an opportunity to weigh in,” said Antonio Villaraigosa, the Los Angeles mayor, who supports it, in an interview here on Thursday. He believes that new approaches are vital and that teachers’ unions are “the most powerful defenders of a broken system.” That’s coming from a politician who, in his early career, worked as a labor organizer for teachers.

He said he revered the profession of teaching, considered most teachers heroes and believed in unions, but, “The notion that seniority drives every decision — assignments, promotions, layoffs — is unsustainable.” He explained that it took performance out of the equation and was discordant with the experience of most other professionals. “Imagine if I ran for a third term and said, ‘Vote for me, I’ve been here the longest.’ ”

Over the years, the teachers’ unions have indeed guarded tenure protections and last-in-first-out layoff practices to a zealous degree that could at times seem indifferent to the welfare of schoolchildren. “We bear a lot of responsibility for this,” Weingarten told me in a phone interview on Friday. “We were focused — as unions are — on fairness and not as much on quality.” And they’ve sometimes shown a spectacular blindness to public sensitivities in their apparent protection of certain embattled teachers in given instances.

The unions have also run afoul of the grim economic times. “In the private sector, nobody’s got any security about anything,” said Charles Taylor Kerchner, a professor of education at Claremont Graduate University. So the unions’ fights over pay raises and pensions, he said, made previously routine negotiations “look like pigs at the trough.”

Image Frank Bruni Credit... Earl Wilson/The New York Times

Kerchner was being sympathetic and said that teachers were hardly overpaid. But they have unwittingly assisted efforts by Republicans in particular to turn them into caricatures of entitlement in an era when there are many Americans poised to see them that way.