Hillary Rodham Clinton delivered on Saturday her boldest remarks yet on race and gun violence, topics that have quickly become some of the most prominent and divisive in the presidential campaign, particularly after Wednesday’s mass shooting in Charleston, S.C.

“It’s tempting to dismiss a tragedy like this as an isolated incident, to believe that in today’s America bigotry is largely behind us, that institutionalized racism no longer exists,” Mrs. Clinton said in a speech in San Francisco. “But despite our best efforts and our highest hopes, America’s long struggle with race is far from finished.”

Invoking President Obama at times, Mrs. Clinton called for a “common sense” approach to gun laws, pledging to take swift action if elected. She did not, however, make clear how she would navigate the divide in Congress that has undercut Mr. Obama’s own efforts to pass gun laws.

“The president is right. The politics on this issue have been poisoned,” Mrs. Clinton said. “But we can’t give up. The stakes are too high. The costs are too dear. And I am not and will not be afraid to keep fighting for common sense reforms.”