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.
Watch ABC News' Interview with SSG Giunta on being awarded the Medal:
Guinta Served Valiantly in Afghanistan
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.
Watch ABC News' Interview with SSG Giunta on the intense firefight he faced.
The Brennan and Mendoza families were in attendance at today's ceremony and received sustained applause when President Obama introduced them.
Noting the loss of their sons, Obama said, "I know that there are no words that even three years later can ease the ache in your hearts or repay the debt that America owes to you, but on behalf of a grateful nation, let me express profound thanks to your sons' service and their sacrifice."
Several of Giunta's squad mates also were on hand for today's ceremony and received a similar round of applause when they were introduced.
Following today's ceremony, Giunta displayed his characteristic humility when he said that though receiving the award was "an incredible experience," he added," I want to make it be known that this represents all service members from all branches that have been in Afghanistan since 2001 [and] Iraq since 2003, who were there yesterday, are there today and will go again tomorrow. I really appreciate them, because without their service I have nothing."
Watch ABC News' Interview with SSG Erick Gallardo on SSG Giunta rescuing him:
Guinta: Medal of Honor Ceremony Bittersweet
He called the ceremony bittersweet because days like today remind him of the night when "I lost two dear friends of mine, Spc. Hugo Mendoza and Sgt. Josh Brennan. And although this is so positive, I would give this back in a second to have my friend with me right now."
Giunta also praised the "unsung heroes of heroes of this war" who "never come back and return a handshake or give a hug or see their family. And we have to give the time to remember them. Because that is the quality of American soldiers we have willing to go to war, to fight and do whatever is necessary until the battle is done."
Watch ABC News' Interview with SSG Erick Gallardo on Sgt. Joshua Brennan: