He said there is a chance to deal the Taliban a "strategic setback."
Gates, on his first visit to Pakistan as defense secretary, said his talks with Pakistan's President Pervez Musharraf and U.S. commanders focused on how to increase pressure on militants along both sides of the Afghan-Pakistani border.
Gates said today's talks with Musharraf focused on how to increase pressure on Taliban and Al-Qaeda fighters along both sides of the Afghan-Pakistani border.
"We discussed the coming spring military activity on the border and the measures that the Afghans, the NATO alliance, the United States, and Pakistan working together can take -- both separately and together," Gates said.
Gates described Pakistan as a "very strong ally" of the United States. But he said he also spoke to Musharraf about concerns expressed during a NATO defense minister's meeting in Seville, Spain, in early February.
"I described to [President Musharraf] the augmentation of U.S. forces on the Afghan side of the border that I directed a few weeks ago, and also talked to him about the comments that I had made and others had made at the NATO defense ministers' meeting about increasing their commitment -- both in terms of military forces but also economic development and reconstruction resources for Afghanistan," Gates said. "We talked about the importance of seizing the offensive this spring to deal the Taliban and Al-Qaeda a strategic setback."
Musharraf insists Pakistan is doing all it can to stop cross-border militancy. Islamabad has deployed about 80,000 troops along its border with Afghanistan.
U.S military commanders say Taliban and Al-Qaeda have increasingly used Pakistan's border regions as a haven since Islamabad reached a peace agreement with tribal leaders in Waziristan in September.
Gates also said that U.S. forces plan to stay in Afghanistan "for the long haul."
"After the Soviets left, the United States made a mistake," Gates said. "We neglected Afghanistan, and extremism took control of that country. The United States paid a price for that on September 11, 2001. We won't make that mistake again."
Gates said part of that continuing U.S. engagement is to play a constructive role to improve "understanding and coordination" between Islamabad and Kabul. He said Pakistan, Afghanistan, and the United States all have a mutual interest in stabilizing the Afghan-Pakistani border and allowing Afghanistan to become a "stable and prosperous democracy."
(RFE/RL's Radio Free Afghanistan Najib Aamir contributed to this report from Pakistan; with reporting by Reuters, AP, AFP)