“The money was almost exclusively on the pro-gun side of the fence before, and we were always accused of spending our way to victory,” said Richard Feldman, a former N.R.A. executive who leads the Independent Firearms Owners Association. “Now the other side has these resources from Michael Bloomberg to get involved in these state and local races, something they didn’t have before.”

The organization Everytown for Gun Safety — which received $36 million in contributions last year, with the biggest chunk coming from Mr. Bloomberg — has eclipsed a number of older gun control groups in publicity and influence. In its latest push, the group is funding an ad campaign for players from the National Basketball Association to speak out against gun violence.

The group, created in 2014 after the slaughter in 2012 of 26 children and adults at an elementary school in Newtown, Conn., says its supporters have now grown to three million nationwide, including survivors of shootings, mayors, police officers, celebrities, and rank-and-file supporters. It has chapters in all 50 states, with registered lobbyists in 31 of them, adopting a structure used to great effectiveness by the N.R.A. itself. Mr. Bloomberg has pledged to spend at least $50 million of his own money in the group’s push for tougher gun restrictions — a level of spending that Jennifer Baker, an N.R.A. official, called “obscene.”

In some races, gun control advocates are outspending the deep-pocketed N.R.A. And after the mass shooting in San Bernardino, Calif., and earlier rampages at a Planned Parenthood facility in Colorado, a community college in Oregon and a church in Charleston, S.C., gun control advocates said they planned to expand their push for stiffer local restrictions still further. They believe their cause was buoyed last month when the Supreme Court let stand an ordinance in a Chicago suburb that bans semiautomatic assault weapons.