WASHINGTON—President Barack Obama said Thursday that eight million people had picked health-insurance plans through the Affordable Care Act, a number that significantly outstripped initial projections and emboldened him to step up criticism of Republicans seeking to repeal the law.

The president, in a surprise Thursday afternoon appearance in the White House briefing room, employed markedly more aggressive rhetoric in defending his...