BOSTON — While agreeing on policy issues like a need to raise new revenues and improve transportation infrastructure, Democrats Jay Gonzalez and Bob Massie diverged from each other in a televised debate Thursday over how they'd approach working with the Legislature if elected as the next governor of Massachusetts.

During a half-hour debate on WGBH's "Greater Boston," Massie described the Democratic Party as "out of touch" and said he'd mobilize outside forces to bring change to Beacon Hill, while Gonzalez said the Democrat-controlled Legislature needs more of a push from a governor who could provide both leadership and "healthy tension."

With 19 days remaining before the Sept. 4 primary, the two candidates also traded a few barbs.

When Massie, a Somerville environmentalist and entrepreneur, described himself as a "movement leader," Gonzalez responded, "I think a good indicator of the ability to be a movement leader is the strength of a campaign," and noted he was the one who won the Democratic Party's backing at its June convention.

Massie knocked Gonzalez's response to moderator Jim Braude's question on plans for new tax revenue -- Gonzalez said he'd immediately ask the Department of Revenue for options to ask "those doing well" to pay more -- as a "huge cloud of vagueness."

Gonzalez, who served as budget chief in Gov. Deval Patrick's Cabinet, said his leadership experience in state government makes him the better candidate.

"I was often the governor's point person for negotiating a lot of the big things we got through the Legislature, with key stakeholders, so I've been there, I've done it," he said. "It's not going to matter what Bob and I want to do to make a difference in regular people's lives unless we actually deliver on it, and I think I'm best positioned to do that."

Massie said it was fair to describe him as the "outsider candidate" and Gonzalez as the "insider candidate."

"His time and energy has been spent up on Beacon Hill," Massie said. "I'm someone who has led nationally, internationally, and I think what people are looking for is really a bold leader who's able to bring people together, who understands what's happening globally."

Massie said Gonzalez "wants to be a bold leader, but I don't think he's had the full imagination of all our opportunities." Gonzalez said Massie would be "a lot better governor than Charlie Baker" and called the Republican incumbent "a terrible governor" who is "not doing nearly enough to make a difference in regular people's lives."

As of the end of July, Baker -- who also faces a primary challenge from Springfield pastor Scott Lively -- had more than $8.4 million in his campaign account and was up on the air with a television commercial, compared to Gonzalez's $431,660 and Massie's $82,976.

On transportation, Gonzalez called for improving regional transit and investing in expansion projects that drive economic growth and Massie said the state needs a 10-year vision that connects its cities. Massie said he does not support congestion toll pricing, while Gonzalez said it would be worth trying.

Asked about the House and Senate, both of which are controlled by Democratic supermajorities, failing this session to reach accord on school funding and health care legislation, Massie said Democrats "are out of touch with what's going around."

"I'll say that as someone who admires many of the people in the Legislature, but here's the reality, the Democratic Party needs to open up, it needs to grow, it needs to be in touch with its younger members, it needs to be in touch with the millions of people who are hurting in this state and not playing games and enabling the governor to do the things -- push stuff out so he doesn't have to act."

Gonzalez disagreed, saying he didn't think the Legislature was out of touch, but said, "They need to be pushed."

"Right now we've got a governor who isn't asking them to do anything," Gonzalez said. "To the extent that any good stuff has happened -- the minimum wage increase, paid family leave, it's been because activists pushed for it and the Legislature passed it and Governor Baker got pushed into a corner into signing it."

The candidates also differed somewhat in their response to recent remarks by U.S. Sen Elizabeth Warren, who in a New Orleans speech earlier this month called the criminal justice system "racist" from "front to back."

"We have a serious problem with institutional racism, where our attitudes get hardened into structure," Massie said when asked if he agreed with Warren. He said he recently visited the state prison in Norfolk and spoke with 60 inmates, 59 of whom were African American, about cuts to re-entry programs.

Gonzalez said he thinks the criminal justice system has "institutional problems that are resulting in racial disparities."

"I don't know if I'd go so far as to say it's racist, but I think we should be really concerned," he said.

While discussing issues related to sexual violence and harassment, Gonzalez said Wynn Resorts' license for a resort casino in Everett should be revoked because there was an environment that "enabled" the behavior of former chairman and CEO Steve Wynn, who has been accused of sexual misconduct.

Massie said the license "probably" should be revoked and that he did not think Massachusetts should have allowed casinos to open here in the first place. The state's first resort casino, MGM Springfield, is set to open next week on Aug. 24.