New York Gov. Andrew Cuomo and the Democratic nominee for New York City mayor, Eric Adams, pledged to work together to combat elevated gun violence in the nation’s largest city, as Democrats across the country try to coalesce around a public-safety message.

In their first joint appearance since Mr. Adams clinched his party’s nomination, the Democratic governor and the front-runner for mayor unveiled state funding for nonprofit and church organizations in central Brooklyn, including programs for summer employment and job training as well as “violence interrupters” to mediate gang disputes.

Wednesday’s appearance provided another opportunity for Mr. Adams—a former New York Police Department captain and currently Brooklyn borough president—to promote his vision for how Democrats can seize public safety as an issue during a period of rising crime. Mr. Adams also met this week with President Biden, who is working to counter rising crime in American cities amid criticism from Republicans who contend that Democrats have failed to sufficiently respond.

Mr. Adams said Wednesday that it was important to make clear that crimes would have consequences and to focus resources on preventing crimes motivated by poverty.

“Give those young people who are carrying a gun the real services they need and identify the services beforehand. You have to have intervention and prevention,” Mr. Adams said.

There have been 803 shooting incidents in New York City so far this year, up from 623 incidents during the same period in 2020 and 389 incidents during the same time in 2019, according to NYPD data. There have been 225 homicides this year in the city, an increase of 5% from 2020 and 37% from 2019, according to the NYPD.

Violent crime and homicides have increased in many major U.S. cities this year. Philadelphia police reported 284 homicides as of this week, a 31% increase from the same period last year, and Los Angeles police reported 185 homicides through July 3, an increase of 24% from 2020. In Chicago, the number of homicides this year is down slightly.

New York Police Commissioner Dermot Shea said last week that officers are seeing more guns on the street and that criminals have been emboldened because court closures as a result of the pandemic have slowed the progress of gun-crime cases. He said the number of shootings in June of this year was lower than in June of 2020.

“It’s progress, but we know we have so much more work to do,” Mr. Shea said.

Mr. Cuomo has famously feuded with outgoing New York City Mayor Bill de Blasio, a Democrat who wasn’t present for Wednesday’s announcement. A spokesman for the mayor said the state initiative would be a productive addition to the city’s existing summer jobs program, which serves 75,000 people.

The state funding disclosed by Mr. Cuomo on Wednesday was approved in April, but expedited for release by an executive order the governor signed last week.

Republicans said the initiatives were an indirect response to the problem of rising violent crime and blamed changes to the criminal-justice system enacted by Democratic officials in 2019. New laws eliminated the use of cash bail for most misdemeanor and nonviolent felony offenses.

Albany County District Attorney P. David Soares, a Democrat who headed a statewide association of prosecutors in 2019, said that the bail law was contributing to an increase in shootings around the state and that Mr. Cuomo was “insulting the public and he’s insulting law enforcement” by ignoring it.

Rich Azzopardi, a senior adviser to the governor, said shootings were up in cities around the country, even in places where there were no changes to their bail system. On Wednesday, Mr. Cuomo said it would take a comprehensive approach to address the problem.

Curtis Sliwa, the Republican candidate for New York City mayor, faulted Mr. de Blasio and the New York City Council for adopting a budget that shifted nearly $1 billion away from the NYPD.

“Without more police, there will be more gangbangers,” Mr. Sliwa said.

Write to Jimmy Vielkind at Jimmy.Vielkind@wsj.com