Gates told a Senate panel that a military option would only delay Iran's nuclear ambitions and drive the program further underground, making it more difficult to monitor, he said.
He said the better option would be for the United States and its allies to convince Iran that building a nuclear program would start an arms race that would leave the country less secure.
"Their security interests are actually badly served by trying to have nuclear weapons," Gates said. "They will start a nuclear arms race in the Middle East and they will be less secure at the end than they are now."
Gates was joined by Secretary of State Hillary Clinton in an appearance before the Senate Appropriations Committee to discuss the 2009 supplemental request.
Clinton and Gates told the panel the United States and its allies should pressure Iran with tougher sanctions.
"We do have intensive consultation efforts going on with our friends and like- minded nations, not only in the region but elsewhere in the world concerning the threats that Iran poses," Clinton said.
Gates said the U.S. should partner with Russia on missile defense programs in the region to isolate Iran, an issue that has soured relations with Russia recently.
"I think there is value in pursuing a partnership with the Russians on missile defense in Europe and in Russia itself," he continued, but did not elaborate.
Another hot-button issue that touched off questions from the panel: the final destination of suspected terrorists held at Guantanamo Bay, Cuba.
Gates said the relocation to the United States of dozens of suspected terrorists held there is being discussed by U.S. officials this week.
Gates told senators the Department of Justice has started working on relocation plans within the United States for detainees who cannot be tried or transferred to another country.
The issue of moving the detainees is a touchy subject among politicians who do not want the high-profile prisoners in their backyards.
Gates told committee members he understands that the majority of Congressional members will file legislation barring the U.S. from moving the detainees to their states.
While the Department of Justice is sorting through the 241 detainees cases to see who will not be put on trial or be taken by other countries, Gates said the number will most likely fall between 50 and 100 that could be relocated.
"There clearly will be a specific plan that comes out of this, but what we've had to await is the determination, roughly speaking, of about how big a group of people we will be talking about. And so the review of each of these case files has to precede the development of a specific plan in terms of where the prisoners would go," Gates said.
An early possibility: the Army's prison facility at Fort Leavenworth, Kansas, which is being considered as a site to build a detention facility especially for the detainees.
Kansans have been outspoken about rejecting the idea, and panel member Sen. Sam Brownback started his questioning of Gates with a plea.
"Please not at Leavenworth. I think you should look overall, and I'm glad you're looking at Europe with that," said the Kansas Republican.
"It's a hot topic with your commander at that base, whose primary mission is educational," Brownback continued.
"What we are attempting to do is try to convince other countries to take back their own nationalities of detainees and perhaps even others," Clinton said when asked about the status of the closing down the detention facility.
Senators were also concerned whether the Pakistani leadership understood what was happening inside their country.
As Taliban forces threaten to move closer to the capital Islamabad, and instability throughout the country looms, Secretary Gates likened the struggle to a familiar fight in the U.S.
"The United States was first attacked by Al Qaida in 1993. Al Qaida was at war with the United States for eight years before we decided we were at war with Al Qaida," Gates said. "I think the same kind of thing has kind of happened in Pakistan, the Pakistanis haven't realized the threat that has been posed to them over the last several years," he said.