"We should not presume to make the decision for the families - we should actually let them make it," Gates said at a Pentagon news conference.
He cited a difference of opinion inside the Pentagon about whether to change the policy, based on concerns about what would be in the grieving families' best interests. He said he was "never comfortable" with the ban.
"We've seen so many families go through so much," added Admiral Mike Mullen, chairman of the Joint Chiefs of Staff. He said the goal is to meet family needs in the most dignified way possible.
White House press secretary Robert Gibbs said President Obama asked Gates to review the policy of media coverage. Gibbs said Gates came back with a policy consistent with one used at Arlington National Cemetery.
Gibbs said it gives families the final say and "allows them to make that decision and protect their privacy if that's what they wish to do. And the president is supportive of the secretary's decision."
A veteran's group welcomed the move.
"All too often, the sacrifices of our military are hidden from view," Paul Rieckhoff, executive director of the Iraq and Afghanistan Veterans of America. "The sight of flag-draped coffins is, and should be, a sobering reminder to all Americans of the ultimate sacrifice our troops have made and the high price of our freedom."
But a spokeswoman for a military family group expressed disappointment. "This is a complete disregard for the will of America's military families and the need for their privacy during this solemn moment," said Meghan Tisinger, spokeswoman for Families United.
Gates said family groups had been consulted and agreed with the changes.
Two Democratic senators, John F. Kerry of Massachusetts and Frank Lautenberg of New Jersey, urged Obama to let news photographers attend ceremonies at Dover and other military facilities when military remains are returned to the United States. The Dover base is where casualties are brought before they are transferred on to the families' hometowns.
Gates said he initially asked for a review a year ago and was advised that families might feel uncomfortable with opening the ceremonies to media or that the relatives may feel pressure to attend the services despite financial stresses.