In stark contrast to predecessor Donald Rumsfeld, Gates also said there was no doubt the Army and Marine Corps needed to be larger if they are to deal with future wars and give troops enough rest between combat tours.
"We need the full range of military capabilities," including ground combat forces to battle large armies and nimble special operations troops to scout out terrorist threats, Gates told the House Armed Services Committee.
"We don't know what's going to develop in places like Russia and China, in North Korea, in Iran and elsewhere," he said.
Gates testified alongside Marine Corps Gen. Peter Pace, chairman of the Joint Chiefs of Staff, as the House was gearing up for its first full-fledged debate on the Iraq war since the Nov. 7 elections. House Democrats plan next week to bring to the floor a measure that would flatly oppose President Bush's decision to send 21,500 more troops to Iraq.
Pace and Gates said they did not think debate in Congress would hurt the morale of troops in combat, undercutting an assertion by many congressional Republicans that members opposing the war were undermining the fighting forces there.
"As long as this Congress continues to do what it has done, which is to provide the resources for the mission, the dialogue will be the dialogue, and the troops will feel supported," Pace said.
Gates added that troops understand members of Congress want to find the best way to win the war. "I think they're sophisticated enough to understand that that's what the debate's really about," he said.
Earlier in the hearing, Rep. Duncan Hunter, the top Republican on the panel, said he would oppose any resolution on Iraq.
"I do not think you can send a message that is going to raise the morale of the troops while at the same time sending a message that we don't support the mission," the Californian said.
Gates said U.S. forces might be able to start leaving Iraq before the end of the year, if the Iraqi government makes strides to subdue violence and reach a political settlement.
"That is essentially the best case story. And that is our hope," he told the House panel.
White House spokesman Tony Snow told reporters Wednesday that it was premature to criticize the Iraqi government, which is sending fewer troops than expected to Baghdad and has fallen behind on its own target dates for enacting legislation intended to improve relations between Shiites and Sunnis.
"Our job is to work with the Iraqis and to push them. It is not to scold them," Snow said. "That doesn't do you any good. It's really lousy diplomacy, as a matter of fact."
Democrats and several Republicans say they oppose the troop buildup and that it is time the Iraqi government stepped up to defend its own country.
Tired of waiting for an opportunity to try to stop the war in Iraq, some Democrats say they want to use legislation approving billions of dollars in war spending to insist that Bush not send more troops or bring troops home by a certain date.
"The longer we delay taking action, the greater the failure in Iraq and the larger the cost in American blood and treasure," said Sen. Christopher Dodd, D-Conn., who supports legislation that would cap the number of troops allowed in Iraq.
Sens. Barack Obama and John Kerry, D-Mass., separately pushed legislation ordering troops out of Iraq within a year.
"This is not a symbolic vote," Obama, D-Ill., said of his proposal, which is backed by two House Democrats. "This is what I think has the best chance of bringing our troops home."
Democratic leaders in both the House and Senate have pledged to their rank-and-file that a vote on a non-binding resolution opposing the troop buildup would merely be the first attempt to pressure Bush to shift course in the war. Other legislation will be binding, they said.
Rep. John Boehner, R-Ohio, his party's House leader, said in an interview that he hoped the GOP would be permitted to seek a vote on an alternative. If so, he said it would call for a bipartisan committee to oversee the war effort, and lay out a series of benchmarks by which people could judge whether the Iraqi government was living up to its commitments to help quell the violence.
"If you're not for victory in Iraq, you're for failure," Boehner said. "The consequences of failure are immense. I think it destabilizes the entire Middle East, encourages Iran and on top of that it's pretty clear that the terrorists will just follow us home."