Robert Gates has a long history his of serving his nation in Government. Born in 1943 he began serving his country In 1966 when he was recruited by the CIA under Lyndon Johnson. In 1974 he joined the National Security Council where he served under Nixon, Ford, and Carter until 1979. It was then that returned to his position with the CIA and rose to the position of deputy director in 1982. In 1989 he served as Deputy National Security advisor and in 1991 he became Director of the CIA where he served until 1993.
Gates then worked in academics and became the President of Texas A&M in 2002. In 2006 he
joined the Bush administration, replacing Donald Rumsfeld as Secretary of Defense. One of the reasons Robert Gates was nominated by President Bush was because he wanted someone who would be easily confirmed by the Democrat controlled Senate because he was not seen as a partison. And he was by a vote of 95 - 2.
When President Obama took office he chose to have Robert Gates stay on as Secretary of Defense because he was someone respected by both parties. He served until July 2011 where he left the Obama administration on good terms.
In January of 2014 Robert Gates released the book Duty 'Memoirs of a Secretary at War.' In it he reveals the disturbing fact that while both Hillary Clinton and Barack Obama were publicly against the Iraq military strategy put forth by the Bush administration known as the "surge", they were only taking the position for political reasons. In Gates' book it is revealed that they both actually favored Bush's surge policy but were speaking out against it simply for their own personal political gain. Neither have denied the charges.
The surge policy in Iraq involved sending an extra 30,000 troops into Iraq in an effort to finally conquer the insurgency. After it was implemented in 2007 the violence was greatly reduced, the nation was stabilized and plans were made to begin withdrawing troops. Many observers credit the "surge" for this success. When the surge policy was introduced it was roundly criticized by Democrats, most of whom called for the troops to come home regardless of situation on the ground.
Clinton said the US president was "taking troops away from Afghanistan, where I think we need to be putting more troops, and sending them to Iraq on a mission that I think has a very limited, if any, chance for success".
"I'm for redeploying our troops out of Baghdad and eventually out of Iraq so we can make sure that they're not in the midst of a civil war."
It turns out that she has admitted she lied in that interview for her own personal political gain and really did favor taking troops out of Afghanistan and deploying them in Iraq for the "surge," as she claimed Bush wanted to do, and did not really believe that the chances of success were "very limited" and did not favor redeploying the troops out of Baghdad into Afghanastan. It was the policy she publicly spoke in favor of that turned out to be wrong and according to Gates' book she believed the policy was wrong but spoke out in favor of it anyway.
Keep in mind Barack Obama agreed with the surge policy at the time of this questioning
As quoted from Gates' book:
“Hillary told the president that her opposition to the  surge in Iraq had been political because she was facing him in the Iowa primary. . . . The president conceded vaguely that opposition to the Iraq surge had been political. To hear the two of them making these admissions, and in front of me, was as surprising as it was dismaying.”
Putting the conversation in context
In 2007 Barack Obama announced he would be running for president. He positioned himself as being against the surge and for taking troops out of Iraq and redeploying them into Afghanistan. This was at a time when the violence in Iraq was very high and all hell would have broken loose without the presence of U.S. troops. Democrats were blasting away at the suggestion of adding more troops to Iraq and were blasting away at General Petraeus in hearings on capitol hill just for suggesting it would work and later for suggesting it was working after it was implemented. Hillary Clinton said in a hearing questioning Petraeus when he was informing congress on he success of the surge said "The reports that you provide to us really require the willing suspension of disbelief." Keep in mind she agreed with the surge at the time of that statement and was still behaving as though she didn't.
After the success of the surge it came time for President Obama to do what candidate Obama said he would do and redeploy the
troops to Afghanistan. According to Robert Gates President Obama was second
guessing himself on the strategy of sending more troops to Afghanistan and lacked confidence in top military advisors who were telling him this would be the right thing to do. Hillary Clinton and Robert Gates also believed it was the right thing to do and that is when Hillary Cinton revealed to president Obama that she actually favored the Bush's Iraq surge policy but was simply saying she was against it for personel political gain. Barack Obama also "vaguely" conceded that he also said he was against Bush's Iraq surge for purely political reasons. Eventually they convinced the president to send more troops to Afghanistan.
Keep In mind Hillary Clinton has admitted to agreeing with the surge policy at the time of this questioning (Long Version Below)
Scandalous revelations unveiled about Hillary Clinton and Barack Obama in Secretary Robert Gates latest Book