The New Jersey Senate voted on Thursday to override Gov. Chris Christie’s veto of a gun control bill, the first time state lawmakers had mustered enough votes in more than 50 attempts at undoing one of his vetoes.

An override, which still must pass the State Assembly, would dilute one of the claims Mr. Christie has repeatedly made while campaigning for the Republican presidential nomination — that he has managed without fail to hold his party together in the State House. Democrats control both branches of the Legislature, but they need help from Republicans to override one of Mr. Christie’s vetoes.

The governor said in a debate with other Republicans running for president that he had “vetoed 400 bills from a crazy liberal Democratic Legislature” and pointed with pride to the failure of every challenge. But his string of successes at thwarting lawmakers came to an end on Thursday when three Republican sponsors of the bill joined the Democrats in voting to override.

“It’s presidential politics,” said the Senate president, Stephen M. Sweeney, a Democrat from Gloucester County who is considered a probable candidate for governor in 2017. “The only person that objected to this bill was the governor.”