WASHINGTON — Jonathan Gruber, the health economist whose incendiary comments about “the stupidity of the American voter” have embarrassed the Obama administration, apologized on Tuesday for what he described as his “glib, thoughtless and sometimes downright insulting comments.”

“I am not a political adviser nor a politician,” said Dr. Gruber, a professor at the Massachusetts Institute of Technology who was a paid consultant to the Obama administration in 2009 to 2010.

Dr. Gruber minimized his role, saying he had used an “economic microsimulation model” to help the administration and Democrats in Congress assess the impact of policies in the Affordable Care Act. He later defended the law in a number of speeches. In one, he said the law had been adopted, in part, because of the stupidity of voters and a “lack of transparency” about its financing.

Testifying on Tuesday before the House Committee on Oversight and Government Reform, Dr. Gruber said: “I behaved badly, and I will have to live with that, but my own inexcusable arrogance is not a flaw in the Affordable Care Act. The A.C.A. is a milestone accomplishment for our nation that already has provided millions of Americans with health insurance.”