Tempers have calmed since then, but there remain sore points between the two allies, particularly U.S. drone strikes and alleged Pakistani support for the Afghan Taliban.
These issues, as well as the role Pakistan can play in promoting a peace deal in Afghanistan, are expected to figure prominently in the meeting between Obama and Prime Minister Nawaz Sharif. Few observers expect breakthroughs, but more notable for some is the lack of fireworks given the past relationship.
"Where's the anger, the bitterness?" Cyril Almeida wrote in a column in Pakistan's Dawn newspaper. "They aren't sulking, they aren't fighting, they aren't fawning over each other, they aren't lecturing each other - nothing. It's all a bit boring."
The trip by Sharif, who took office in June, will mark the first official visit by a Pakistani leader to Washington since Obama became president in 2009 - a sign of how troubled the relationship has been for much of that time.
Sherry Rehman, Pakistan's former ambassador to Washington and now the president of the Islamabad-based Jinnah Institute, sees the visit as an opportunity to continue the process of improving ties after they hit a nadir in 2011.
That year included not only the bin Laden raid in a Pakistani garrison town, which outraged Islamabad because it was not told about it beforehand, but also the shooting deaths of two Pakistanis by a CIA contractor in the eastern city of Lahore and the accidental killing of two dozen Pakistani troops in a U.S. airstrike along the Afghan border.
The deaths of the troops led Pakistan to close NATO supply lines to Afghanistan for more than seven months until the U.S. apologized. The ups and downs have led both countries to more realistic calculations about what they can expect from each other, analysts say.
The relationship "has gone through a fair amount of introspection on both sides," Rehman said.
The U.S. quietly decided ahead of the meeting to release more than $1.6 billion in military and economic aid to Pakistan that was suspended when relations disintegrated in 2011. The decision did not appear to be directly related to the visit but could set a positive tone.
The two countries will likely bring different priorities to the meeting, said Michael Kugelman, senior program associate for South Asia at the Washington-based Wilson Center. While the U.S. is focused on Afghanistan, Pakistan is keen to discuss a broad range of issues, such as trade to help boost its struggling economy, he said.
"My sense is that there is a disconnect between the U.S.'s expectations and Pakistan's expectations," for Sharif's visit, Kugelman said.
The U.S. is running out of time to achieve one of its main goals in Afghanistan, pushing through a peace deal between the Taliban and the Afghan government before the end of 2014 when it is scheduled to withdraw most of its troops from the country.
Pakistan is seen as key to this process because of its historical connection to the Taliban. It helped the group grab power in Afghanistan in 1996 and is widely believed to have maintained ties as a hedge against neighbor and archenemy India - an allegation denied by Islamabad.
Pakistan has released over 30 Taliban prisoners in the last year, including former deputy leader Mullah Abdul Ghani Baradar, in an attempt to jumpstart the stuttering peace process. But it seems to have done little good, and some of the fighters are believed to have returned to the battlefield.
The U.S. has said it is pleased with Pakistan's recent efforts to support the peace process. But Pakistani analysts believe Islamabad could face demands to do more, especially in pressuring Afghan Taliban militants and their allies who have long used Pakistani territory to launch cross-border attacks against American troops in Afghanistan.
"The U.S. will press for a more forthright policy on containing terrorism," said Hasan Askari Rizvi, an independent Pakistani political analyst.
Sharif has said he will raise the issue of U.S. drone strikes targeting militants in Pakistan's tribal region. The prime minister and other Pakistani officials have decried the strikes as a violation of the country's sovereignty.
But the U.S. has shown no indication it is willing to abandon the attacks, even though the number has dropped in the past couple of years. The Pakistani government secretly supported the strikes in the past, and U.S. officials claim some key leaders still do.
Nevertheless, failure to show progress on the drone issue could be a problem for Sharif.
"He'll have to show that the visit has been successful," Rizvi said. "On the one major issue that he wants to play up, the drones, he's not going to get any U.S. commitment."
Associated Press writer Matthew Lee contributed to this report from Washington.