It was one of the more optimistic comments about the war's outlook by Gates, who has overseen an escalation of U.S. fighting this year and is widely expected to retire in coming months.
The U.S. plans to begin pulling out some of its nearly 100,000 troops in Afghanistan in July. The stated U.S. and NATO goal is to have Afghan forces take the combat lead by the end of 2014.
Gates' comment suggested that he believes the war timeline is on track, although doubts persist that the Afghan government will be capable after 2014 of sustaining the gains achieved by then.
Each spring and summer the Taliban step up their attacks against Afghan government forces and the NATO-led coalition supporting them. That increased offensive is anticipated to begin next month, although allied commanders believe it will be less effective than in previous years because NATO forces found and destroyed many Taliban arms caches over the winter.
"We have driven the Taliban out of areas they have controlled for years, including their heartland," Gates told a Pentagon news conference. "They clearly intend to try and take that back. If we can prevent them this year from retaking the areas that we have taken away from them and we can continue to expand the security bubble, I think it's possible that by the end of this year we will have turned a corner, just because of the Taliban being driven out and, more importantly, kept out."
Marine Gen. James Cartwright, appearing with Gates, said that until the Taliban have the manpower they need to launch a spring offensive, the fighting is likely to feature "individual spectacular" attacks rather than sustained combat involving larger groups of Taliban forces.
Cartwright, the vice chairman of the Joint Chiefs of Staff, said the focus of NATO's efforts now is to target supply routes used by Taliban fighters to move from Pakistan into southern and southeastern Afghanistan
-- "to cut those off, interdict them so they can't be resupplied or build their stocks."