President Barack Obama won a monumental legal victory Thursday when the Supreme Court upheld the vast majority of his health-care law, but the fight for public opinion—and votes in November—showed signs of growing more heated. Mr. Obama can argue that he has secured long-held Democratic goals: Expanding health insurance to millions of additional Americans and limiting the power of insurers to deny coverage. That could help the president motivate core parts of his party's base that he needs for re-election, including college-educated women, younger voters and minorities. But the ruling is likely to re-energize Republicans, who swept to a majority...