Mr Obama kicked off a week-long European trip in Ireland yesterday and toasted his Irish heritage with a trip to the small town of Moneygall from which one of his ancestors came.
The second leg of Mr Obama's European trip is a state visit to the UK where he will to stress the importance of the "special relationship."
He was meant to fly to the UK today but brought forward his flight to last night to avoid potential delays caused by the Icelandic volcanic ash cloud.
Earlier, the Stars and Stripes flew beside the Irish tricolour above the HQ of Bank of Ireland on Dublin's College Green, where the president was met by huge cheers of "Obama, Obama" - the spot where Bill Clinton wooed onlookers in 1995.
"My name is Barack Obama, of the Moneygall Obamas and I've come home to find the apostrophe we lost somewhere along the way," he said.
The president addressed the crowds from behind a specially constructed three-sided, bullet-proof glass structure.
• Barack Obama and his wife Michelle try some Guinness in a pub in Moneygall, the village once home to Mr Obama's great-great-great grandfather. Pic: AP
He said he wished somebody had traced his Irish roots when he was a politician in Chicago, which he dubbed the Irish capital of the mid-west.
The president praised the work involved in achieving peace in Northern Ireland.
"America will stand by you always in your pursuit of peace," he said. "Ireland, you need to understand that you have already passed the world's highest hopes." He added: "A dream has turned to a reality because of the work of this nation."
The president met Northern Ireland first minister Peter Robinson and deputy first Minister Martin McGuinness before making the speech.
In his address, he said: "This little country that inspired the biggest things - your best days are still ahead of you."
Earlier, Mr Obama and his wife, Michelle, visited the tiny village of Moneygall in County Offaly, which was the home of his great-great-great grandfather, a shoemaker, who emigrated to America in 1850.
Crowds lined the streets in Moneygall, which normally only has 300 residents, to welcome Mr Obama. The couple enjoyed a Guinness in a local pub with some of Mr Obama's distant relatives - a pint for the president and a half for his wife.
Mr Obama had earlier held talks with the Taoiseach Enda Kenny. Mr Kenny said the discussions focused on the economic situation in Ireland, including the banking crisis and the efforts to bring the country's budget under control and also US immigration policy.
The Taoiseach also assured the president that Shannon Airport - a stopover point for US military aircraft flying to Afghanistan - would remain open.
Mr Obama will address parliament during his trip to London and hold talks with Prime Minister David Cameron and his deputy Nick Clegg.
The Nato operation in Libya is expected to be high on the agenda, as well as joint sharing of intelligence.
The White House has said the visit will be an important opportunity for Mr Obama to reaffirm the strength of relations between the countries.
"The US and UK of course enjoy a special relationship," said deputy national security adviser Ben Rhodes. "There is no closer ally for the US in the world than the UK. We are in absolute alignment with the British on a range of core international security interests and, of course, our deeply shared set of values that have tied us together for many decades."
Mr Obama is expected to confirm that the White House is to open up its National Security Council to Downing Street in an effort to underline the value Mr Obama's administration places on relations with the UK.
A joint National Security Strategy Board will be set up so officials on both sides of the Atlantic are able to face long-term challenges, instead of just holding emergency talks from the "situation room" in the White House and the Cobra room in the Cabinet Office
Later this week, Mr Obama heads to France, for the G8 summit, then on to Poland to discuss proposals for a US missile shield.