Mr Gates spoke while visiting a military base in North Carolina
US Defence Secretary Robert Gates has warned Pakistan that relations with the US will be threatened unless Islamabad combats the rise of the Taleban.
His comments echo a warning from US Secretary of State Hillary Clinton.
Mrs Clinton said on Wednesday that Pakistan poses a "mortal threat" to the world by abdicating to the Taleban.
Earlier on Thursday, Pakistani troops were sent to tackle Taleban militants who had advanced into a region just 100km (67 miles) from Islamabad.
One policeman was killed in the assault in Buner district, which is next to the Swat valley, where the Taleban holds sway after government forces failed to quell an insurgency.
Speaking at a US military base in North Carolina, from where American marines are about to be deployed to Afghanistan, the US defence chief said some Pakistani leaders recognise the "existential threat" facing the country's government, but needed to act swiftly.
"It is important they not only recognise it [the threat], but take the appropriate actions to deal with it," Mr Gates said.
"The stability and the longevity of democratic government in Pakistan is central to the efforts of the coalition in Afghanistan," he added.
"And it is also central to our future partnership with the government in Islamabad.
The Obama administration is clearly stepping up the pressure on Pakistan's government and security forces to do much more to combat the Taleban, the BBC's Jonathan Beale reports from Washington.
White House spokesman Robert Gibbs issued a separate warning on Thursday, calling the developments in Pakistan "very disturbing".
"We are extremely concerned about the situation and it is something that takes a lot of the president's time," he said.
Tribal elders failed to secure a Taleban withdrawal from Bruner
The Taleban moved several hundred men into Buner, just weeks after a peace deal signed by President Asif Ali Zardari allowed the introduction of Islamic Sharia law in Swat.
Insurgents have now begun patrolling the streets and mounting checkpoints in the area.
The Sharia deal was designed to end a bloody 18-month conflict with the Taleban in Swat by yielding to some of their demands.
But critics say the militants can now use Swat as a springboard to take over new areas of the country.