The US has said the bombing, which took place in the Afghan city of Kunduz, was a mistake and it was attempting to strike the Taliban.
MSF wants the bombing to be investigated as a war crime.
Mr Obama has also apologised to the president of Afghanistan.
"If it is necessary to hold individuals accountable, that will be done," said White House spokesman Josh Earnest.
Mr Obama "expressed his condolences" to MSF president Joanne Liu, said Mr Earnest.
"In the United States when we make mistakes, we're honest about it. We own up to it," he said.
Mr Earnest also hinted at the possibility of paying victims and their families, a Department of Defense policy.
He said he could not say legally whether the bombing was a war crime but the US "goes to great lengths to limit the loss of life" of civilians.
In a statement, MSF said they received the apology but it was still demanding the International Humanitarian Fact-Finding Commission (IHFFC) investigate.
MSF has said it would not trust internal military inquiries into the bombing.
The IHFFC was set up in 1991 under the Geneva Conventions.
MSF says the co-ordinates of the hospital were well-known and its bombing could not have been a mistake.
A number of inquiries have been ordered - by the US justice department, the Pentagon, Nato and an American-Afghan team.
US President Barack Obama has apologised to the president of aid agency Medecins San Frontieres (MSF) for a bombing that killed at least 22.