"My conclusion was we should not presume to make the decision for the families," Gates said in announcing results of a quick review of a ban that had stood through Republican and Democratic administrations.
Although details are being worked out, the new policy will give families a choice of whether to admit the press to ceremonies at Dover Air Force Base in Delaware, the entry point to the United States for the caskets of overseas war dead.
President Barack Obama asked for a re-examination of the blanket ban and supports the decision to change it, White House press secretary Robert Gibbs said.
"I have always believed that the decision as to how to honor our fallen heroes should be left up to the families," Vice President Joe Biden said. "The past practice didn't account for a family's wishes and I believed that was wrong."
Other democracies let their citizens see their young men and women come home from war in flag draped coffins, reports CBS News correspondent David Martin, but for nearly 20 years the U.S. has not.
Except for photos obtained under the Freedom of Information Act, the American public has not been allowed to witness the return of their fallen.
But going forward, media coverage of returning caskets will be governed by the same rules as burials at Arlington National Cemetery - permitted if the family agrees. For Karen Meredith the change comes too late, Martin reports.
"When Ken came home, I never got that photograph of him returning to his home country, the country that he loved so much," Meredith says.
When her son, Lt. Ken Ballard returned to Dover the military would not allow even his mother to have a picture.
"I just wanted to see it," she says. "I just wanted to know that he was being taken care of."
But not every American who has lost a loved one to war wants those images made public, Martin reports. Nikki Das, who lost her husband Erik in Iraq, does not want to share that moment with the world.
"This particular image for me, personally, is not something that i need to see for eternity on the Internet," Das says.
Critics including some Democrats and liberal groups claim the government was trying to hide the human cost of war by preventing modern versions of an iconic image from long-ago wars: a line of flag-wrapped coffins coming home.
"We should honor, not hide, flag-draped coffins," said Sen. Frank Lautenberg, D-N.J. "They are a symbol of the respect, honor and dignity that our fallen heroes deserve."
Lautenberg had written Obama this month asking him to consider lifting the ban put in place by President George H.W. Bush in 1991, at the time of the Gulf War.
From the start, the ban has been cast as a way to shield grieving families.
Advocates for veterans and military families are split on the issue; some say they want the world to honor fallen troops or see the price of defending the country.
"There has never been a greater disconnect between those who serve in harms warm and those back home," said Paul Rieckhoff, executive director of Iraq and Afghanistan Veterans of America. "All too often, the sacrifices of our military are hidden from view."
But John Ellsworth, who lost a son in Iraq in 2004, said photographs of the coffins could be used as anti-war propaganda. "It's pretty obvious that the Pentagon did not discuss this with us," said Ellsworth, president of Military Families United.
He said lifting the ban was arbitrary and poorly thought-out. His organization asked, for example, what would happen if different members of the same family disagree on news coverage.
Gates said he is setting up a team to address such questions. It is not clear when the new policy will be fully in effect.
Gates is the only member of Republican President George W. Bush's Cabinet asked to stay in his job under the new Democratic administration. Gates said he was "never comfortable" with the media ban and had looked at lifting it more than a year ago, under the old administration.
Gates said that at the time, he deferred to advisers inside the Pentagon who argued that the prospect of media coverage could be an onus on vulnerable families.
"I was much happier with the answer I got this year," Gates said.
Gates said there remains a division of opinion inside the Pentagon about whether the ban is appropriate. But he dismissed as "ancient history" a question about whether the ban originated as a public relations strategy.
As of Wednesday, at least 4,251 members of the U.S. military had died in the Iraq war since it began in March 2003, according to an Associated Press count.
As of Tuesday, at least 584 members of the U.S. military had died in Afghanistan, Pakistan and Uzbekistan as a result of the U.S. invasion of Afghanistan in late 2001, according to the Defense Department.
Under pressure from open-government advocates, the Pentagon in 2005 released hundreds of the military's own images of flag-draped coffins from the two ongoing wars, previous wars and from military accidents. The photographs were released in response to a Freedom of Information request and lawsuit.