The bill would add $35 billion to the child health program, providing a total of $60 billion over the next five years. The money would allow states to cover nearly four million children, in addition to the six million already on the rolls. The program helps families that earn too much to qualify for Medicaid, but not enough to afford private insurance.

Democrats made impassioned pleas for the bill as a way to alleviate hardship caused by the nation’s economic difficulties. But they did not convert the Republicans. On Oct. 18, when the House sustained the president’s veto of a similar bill, 44 Republicans voted for it. By contrast, on Wednesday, 42 Republicans voted with 218 Democrats to override the veto.

Some Republicans said the nation’s economic problems strengthened their case against the bill to expand the State Children’s Health Insurance Program, commonly known as S-chip.

“We will come back to this floor in the next week or two with a $150 billion economic stimulus package to get us out of a recession,” said Representative Phil Gingrey, Republican of Georgia. “We need the money for that. We don’t want to be squandering money to provide health insurance for those who can afford to do it for themselves.”

In his latest veto message, Mr. Bush said the bill would “result in government health care for approximately two million children who already have private health care coverage,” from employers or other sources.