“The Constitution is clear on the qualifications for someone to serve as president and states cannot add additional requirements on their own,” Mr. Murtaugh said. “The bill also violates the First Amendment right of association since California can’t tell political parties which candidates their members can or cannot vote for in a primary election.”

The Trump campaign, which has been closely tracking ballot access issues for months and coordinating with the White House Counsel’s Office, is likely to respond with a lawsuit, according to an official with the campaign. That suit could potentially include a number of plaintiffs, including the Republican National Committee, the California Republican Party and the Trump campaign, but the official warned that nothing about a suit had been finalized.

Nearly a dozen similar bills are active in other states, including New York, New Jersey, Washington and Pennsylvania, according to the National Conference of State Legislatures.

The vast majority of presidential nominees in the last several decades have released their tax returns, with the exception of Gerald Ford in 1976. Mr. Brown and his Republican opponents declined to release their returns during the governor’s races in 2010 and 2014.

Mr. Brown warned in his veto message that such legislation would be a slippery slope.

“A qualified candidate’s ability to appear on the ballot is fundamental to our democratic system,” he wrote. “For that reason, I hesitate to start down a road that well might lead to an ever escalating set of differing state requirements for presidential candidates.”

After Democratic state senators introduced the same legislation this year, aides to Mr. Newsom asked the sponsors to add the requirements for candidates for governor as well.

“This is a huge step forward for financial transparency from people who are trying to become the most powerful person in the world,” said Scott Wiener, the state senator from San Francisco who sponsored the bill. “It is absolutely not just written for Donald Trump. This is for every Democratic and Republican and presidential candidate until the end of time.”