Gates was hired by President Bush and disagreed with Obama over the strategy of sending more troops to Iraq for the surge that helped quell much of the violence over the past year.
And Clinton famously clashed with Obama for months during their head-banging primary battle for the Democratic presidential nomination.
The new team will have until Jan. 20 to put their differences aside and form a cohesive team to defend the nation.
Clinton brings all the credentials and the baggage of her years as a senator and first lady in her husband's administration, as well as Bill Clinton's current globe-trotting philanthropy and fundraising.
In naming Clinton, Obama reached out to a former rival whom he'd battled with during the Democratic primaries. He used her introduction to also take a swipe at Bush's foreign policy that left many of the country's alliances strained.
"Hillary's appointment is a sign to friend and foe of the seriousness of my commitment to renew American diplomacy and restore our alliances," Obama said.
Obama and Clinton clashed over various foreign policy issues during the primaries, particularly Obama's willingness to talk with foreign leaders hostile to the United States. And the Republican National Committee dug out some of its campaign research today to draw up a long list of policy issues on which Obama and Clinton have disagreed.
But today Obama dismissed efforts by the press to resurrect their criticisms of each other, telling one questioner, "I understand you're having fun."
He added, "I think she is going to be an outstanding secretary of state."
In accepting the nomination, Clinton told Obama, "Thank you for this honor." She echoed Obama's theme that "America cannot solve these crises without the world, and the world cannot solve these crises without America."
She ended her comments by turning to Obama and telling him, "May God bless you."
At the close of the news conference, Obama put his arm around Clinton, and she put her arm around him, and they walked out of the room together.
A source close to Clinton said that after the primaries and while she campaigned for Obama, the bitterness of their rivalry diminished.
"She has really warmed to him. They have really warmed to each other," the source told ABCNews.com.
Clinton became a candidate for the State Department during the fall presidential race. "I think there were hints dropped along the way when she campaigned for him. ... And then there was her speech at the convention, her commitment campaigning for him that led to the offer," the Clinton source said.
Clinton, the source contended, would have little trouble advocating for Obama's positions, despite their past differences.
"Listen, they are both lawyers by training and she will represent his interests and the interests of the United States of America. There can come a time in all relationships were there are problems, but I think they are OK now," the source told ABC News.
In introducing Gates, Obama said, "I will be giving Secretary Gates and our military a new mission as soon as I take office: responsibly ending the war in Iraq through a successful transition to Iraqi control."
Obama also indicated that he would act on his campaign promise to boost troop levels in Afghanistan, where the Taliban has been steadily growing stronger.