First of all, it is really irrational to just "hate" America or any country without identyfying what the problems are. Its important to see the other POV so to speak. It applies to both Muslims and non-Muslims, Americans and non-Americans. Anyways, emotional statements aside:
The Midde east and the Gulf region has some very legitimate grivieances against the US foreign policy. Pakistan would probably also come in this category of undue US influence.
The extremists Americans and neo-cons conflate arabs with all muslims and by unnecessarily attacking Islam because of the policy blunders in the ME in the last 50-60 years tyr to make it into a Islam vs Christianity war. The Same thing happens with muslims fanatics as well.
Its the politics of fear that allows rational thinking a second place.
There is a documentary series on neo-cons and their muslim counterparts which is worth watching.
http://www.defence.pk/forums/pakistans-war/25476-power-nightmares-constant-state-fear.html
If you look at comparable opinion polls from countries like Central Asia, Indonesia, Bangladesh e.t.c these are much more favourable to the US than countries that have been constantly been fiddled with like Iran, GCC countries and ofcourse Pakistan, Egypt, Palestine and Jordan. Similarly, large number of latin american countries are also anti-Amerian although there is hardly any "muslim connection" here. The reason again is overthrow of popular governments by the US like in Nicaragua and Panama. And similar attempts in Veneuzala.
After WWII, American has a very positive influence in the Arab world. Iranians also had a very positive view of America and considered it to be a partner and unlike the colonial British that had cuased major problems with Iran. The Arabs regarded America as a country that helped in fighting off Ottoman colonialism with the liberation of their Arab states. Even after US support of the creation of Israel Arabs by and large sided with the US rather than say USSR. The entire cold war, Arabs and most of the muslim countries were solidly behind the US govt. against Communism. So there is NOT some eternal hostility between Arabs and the US or muslims and the US as some perserve it to be.
However, unconditional and at many times unfair support of Israel became the first stumbling block. This is the primary foreign policy and cause of anti-American govt. feelings in the Arab world and wider region. And its is bad not only to America but for Israel itself as it has no checks on its behaviour.
The second problem is the role of the US in controlling Arab or ME regimes. For example the overthrow of the first democracy in the Middle East in Iran by a CIA backed coup that installed the Shah in power paved way for an anti-American Ayatollah takeover of Iran,
There was no "death toAmerica" chants in the streets ofIran before then? Just imagine if China was sucessfull in installing a dictator in the US by toppling the democratically elected government there. And then the dictator runs an opressive regime with Chinese support in the US. I am sure when the American people sucesfully overthrow the Chinese backed dictator, chants of "death to China" on the streets of New York will not be a surprise.
Not meddling into domestic politics of the region and not championing causes of "regime change" in Iran or earlier in Iraq is important for reducing hostility towards America.
For example, after US dismantled their CENTCOM base in Saudi Arabia and moved out their troops post-Iraq in 2004 which had been stationed their since the first gulf war, opinions on America started turning favourable. According to a 2008 opinion poll about 40% had favourable views of the US which jumped from 11% just two years or so back.
Bottom line is, no soverign nation likes its country to be or to be perceived as a working for the interests of a foreing country rather than their own people. And when you have evidence of a foreign country trying to do a regime change, like the CIA backed coup in Iran, then you can be pretty sure that you would have earned a long era of hostility from the host nation.