He said authorities had received "no specific intelligence that anything was going to happen" at the race.
The Federal Aviation Administration barred low-flying aircraft from within 3.5 miles of the site.
Obama was briefed on the explosions by Homeland Security adviser Lisa Monaco. Obama also told Mayor Tom Menino and Gov. Deval Patrick that his administration would provide whatever support was needed, the White House said.
"We still don't know who did this or why," Obama said, adding, "Make no mistake: We will get to the bottom of this."
A few miles away from the finish line and around the same time, a fire broke out at the John F. Kennedy Library. The police commissioner said it may have been caused by an incendiary device but didn't appear to be related to the bombings.
"There are people who are really, really bloody," said Laura McLean, a runner from Toronto, who was in the medical tent being treated for dehydration when she was pulled out to make room for victims.
About four hours into the race and two hours after the men's winner crossed the line, there was a loud explosion on the north side of Boylston Street, just before the photo bridge that marks the finish line. Another explosion could be heard a few seconds later.
By that point, more than 17,000 of the runners had finished the race, but thousands of others were farther back along the course.
The Boston Police Department said two people were killed. Hospitals reported at least 82 injured, at least eight of them critically.
A senior U.S. intelligence official said the two other explosive devices found nearby were being dismantled. The official spoke on condition of anonymity because he was not authorized to discuss the findings publicly.