Gates, who led the Pentagon from 2006 to 2011 under Republican President George W. Bush and then Obama, said in his book, "Duty: Memoirs of a Secretary at War," that Biden had been "wrong on nearly every major foreign policy and national security issue over the past four decades."
The comments, reported in media accounts about the book, were especially stinging about a man who has made foreign policy a large part of his portfolio as Obama's No. 2.
The White House said on Tuesday that the president did not share Gates' assessment of Biden. On Wednesday, in what appeared to be a deliberate show of support, Obama had lunch with Biden in a dining room near the Oval Office and invited photographers to take pictures of the event.
Obama and Biden meet regularly for lunch but, news photographers are almost never allowed to attend.
Reporters grilled spokesman Jay Carney about the book and Biden's role in the administration on Wednesday, prompting a spirited response.
"As a senator and as a vice president, Joe Biden has been one of the leading statesmen of his time and he has been an excellent counselor and adviser to the president for the past five years," Carney said.
"The president has said many times that he greatly appreciates the advice and counsel the vice president gives him on matters both domestic and foreign. And that is absolutely the case."
Carney said the timing of photographers being allowed to shoot pictures of the two leaders' lunch was coincidental. The White House press corps has been pressing for more access for photographers and reporters to such events.
Elsewhere in Washington, other allies were also quick to come to the vice president's defense.
"Isn't it the duty of those who serve the president to raise policy and personnel concerns while still in government and not in a memoir?" Tommy Vietor, a former White House national security spokesman, said in a tweet, knocking Gates.
State Department spokesman Jen Psaki said Secretary of State John Kerry, who served with Biden in the Senate, was an admirer.
"There's almost no one he respects more in terms of his foreign policy expertise," Psaki said.
Not all of the voices were supportive, however. Republican Senator John McCain, who said he has great affection for Biden, told CNN that Biden "has been wrong on a number of occasions."
Biden and Obama are described as having a strong relationship. The vice president is in the mix of Democratic candidates who may run to succeed Obama in the 2016 presidential election.
(Additional reporting by Matt Spetalnick, Roberta Rampton, and Eric Beech; Editing by Jonathan Oatis)