The medal has been awarded posthumously seven previous times for those wars.
At the start of the ceremony, President Obama digressed from his script and ad libbed, "I really like this guy," a comment that drew loud applause and cheers from the audience of dignitaries, family and friends gathered in the White House East Room.
"We all just get a sense of people and who they are," Obama said. "And when you meet Sal and you meet his family, you are just absolutely convinced that this is what America's all about, and it just makes you proud. And so this is a joyous occasion for me, something that I have been looking forward to."
Giunta has told interviewers that any other soldier would have done what he did on the night of Oct. 25, 2007, when his platoon was ambushed by the Taliban in the Korengal Valley in eastern Afghanistan, an area so dangerous to American troops it was dubbed the "valley of death."
President Obama praised Giunta as a soldier who is "as humble as he is heroic," who has said that "he didn't do anything special, that he was just doing his job, that any of his brothers in the unit would do the same thing."
"You may believe that you don't deserve this honor," Obama added, "but it was your fellow soldiers who recommended you for it."
Obama said Giunta risked his life for his squad mates "because they would risk their lives for him. That's what fueled his bravery -- not just the urgent impulse to have their backs but the absolute confidence that they had his."
He noted that Giunta has said of them, "they are just as much of me as I am."
Before he placed the medal and its iconic blue ribbon around Giunta's neck, Obama described in gripping detail the heroism he displayed the night his unit was ambushed.
Obama described the ambush as being "so close that the cracks of the guns and the whizzes of the bullets were simultaneous."
Yet, Giunta "charged headlong into a wall of bullets" to rescue his squad leader, who'd been knocked down by a bullet to his helmet, and dragged him to cover.
Giunta and his squad mates then ran forward in search of the two wounded soldiers who had been leading their patrol when it was ambushed. They found one of them and Giunta "sprinted ahead, at every step meeting relentless enemy fire with his own" to rescue the other wounded soldier.
That was when he saw two Taliban fighters dragging away Sgt. Joshua Brennan, his best friend in the unit.
"Sal never broke stride," Obama said. "He leapt forward. He took aim. He killed one of the insurgents and wounded the other, who ran off."
He then tended to Brennan's wounds, but Brennan did not survive his wounds after he was medically evacuated.
Also killed that night was the platoon's medic, Spc. Hugo Mendoza. Five other members of the squad also were hurt in the ambush. So fierce was the firefight that when the unit returned to base they discovered that every one of them had pieces of shrapnel or bullet holes in their gear.