Gates said during his trip to China he doesn't think North Korea, which possesses nuclear weapons, poses an immediate threat to the United States.
"But on the other hand, I don't think it is a five-year threat," Gates said in a Defense Department release. "Let me be precise: I think that North Korea will have developed an intercontinental ballistic missile within that time frame.
"North Korea is becoming a direct threat to the United States and we have to take that into account."
Gates expressed appreciation for the constructive role China has played in trying to defuse tensions between North and South Korea.
"They clearly have played a helpful role," he said.
"Clearly, if there is another provocation, there will be pressure on the South Korean government to react. We consider this a situation of real concern and we think there is some urgency to proceeding down the track of negotiations and engagement.
"We don't want to see the situation that we've seen so many times before, which is the North Koreans engage in a provocation and then everybody scrambles to try to put 'Humpty Dumpty' back together again.
"I think we would like to see some concrete actions by North Korea that shows they are serious about moving to a negotiation and engagement track.
"Rhetoric is not enough at this time."
A halt to North Korea's missile and nuclear testing would be a start, said Gates, who heads to Japan Wednesday before visiting South Korea late in the week.
Gates's comments came on the same day he was to meet Chinese President Hu Jintao and China conducted its first test flight of a stealth fighter jet.