BEVERLY — Gov. Charlie Baker touted the state's economic prowess to a gathering of North Shore business leaders on Thursday, but warned that a shortage of housing threatens to tamp down gains made in recent years.

Speaking to members of the Greater Beverly Chamber of Commerce, Baker said the economy in post-recession Massachusetts is bursting at the seams with growth.

"It's been about as good as it gets," Baker, a Republican, told about 100 people gathered at the Ferncroft Country Club in Middleton. "We have more people working than at any time in the state's history, we've added about 350,000 jobs over the course of the last five or six years, and the unemployment rate has gone down in every part of the commonwealth."

Baker ticked off a list of initiatives by his administration that he says have contributed to the economy's growth, such as increasing state aid to cities and towns, pumping more money into fixing roads and bridges, and streamlining or eliminating hundreds of antiquated rules and regulations, some of which dated back more than a half century.

"Our cities and towns have the highest free cash budgets they've had in a very long time," he said. "We started with a $1 billion structural deficit and over the past two fiscal years managed to put almost $1 billion into our rainy day fund."

Still, Baker warned that a shrinking inventory of housing in the state is driving up home prices and edging many first-time homebuyers out of the market.

"We have the highest median housing and rental prices in the country," he said. "That's not an area where I wanted to be No. 1."

He said other states that Massachusetts competes against to attract new businesses and skilled workers are "building like mad," which puts the Bay State at a disadvantage.

"In some states they're building more housing every six months than we build in a couple of years," Baker said. "This is one the biggest competitive issues we have."

Baker filed legislation earlier this year aimed at boosting the state's housing stock as part of an ambitious plan to add at least 135,000 new homes over the next five to seven years. The plan calls for providing incentives to cities and towns for easing zoning that many say is at the root of the state's housing shortage.

If approved, the plan would allow town governing bodies to change zoning with a simple majority vote, removing a current state requirement of a two-thirds vote.

Baker filed a similar bill last year, but it failed to get through the Democratic-controlled House and Senate by the end of the formal legislative session.

He urged business leaders and several Democratic lawmakers attending Thursday's event to push for approval of the legislation, "or something like it."

"If we don't get something done on this housing issue, we are going to have a hard time building the kind of future that we would like to build," he said.

Christian M. Wade covers the Massachusetts Statehouse for North of Boston Media Group’s newspapers and websites. Email him at cwade@cnhi.com.