Polls usually do a good job of prediction outcomes, especially in modern western elections, but have polls ever been wrong, and the result of an election (disputed or otherwise) been way off what was expected?
Yes. If you look at the list even where the predicted winner actually won there is often a fairly substantial difference in the prediction and the actual result.
Dewey v Truman is pretty notorious. The race was completely off. The Bradley Effect has also been a term used to coin polling misses where a minority candidate is squaring off against a white one, and was a "concern" raised when Obama was running for the Democratic nod in 2008.
More recently, there have been misses in particular states. Western states like Nevada and Colorado tend to underestimate Democrats because of large Hispanic populations. In 2010, for instance, most polls were showing Sen. Reid and Bennett losing going into the election (Reid won handily, Bennett squeaked by). Something similar happened in Alaska in 2008 for the GOP (both Young and Stevens were losing handily, but Young ended up winning and Stevens, despite being indicted, only lost by a squeaker). In 2012, the nature of the robopolling restrictions in North Dakota meant that the very little polling coming out of that state was showing an easy pickup for the GOP. Instead, Heitkamp held that state for the Democrats.
Individual pollsters also have very checkered records too. Rasmussen was once considered a fairly reputable pollster, but many of their 2010 and 2012 results were just far too optimistic for the GOP. Internal polling released by the campaigns themselves also tend to be far too optimistic for their campaigns, which is usually because they'll likely be releasing an outlier. Most pollsters were off the mark in 2012 because the GOP wave in 2010 had led many of them to believe that the 2008 minority turnout was an aberration and modeled the 2012 electorate to be older and whiter than it actually was. This caused Gallup to be off spectacularly in their tracking of that race (their final numbers were even only because they shut down their polling for a week for Sandy, an entirely improbable swing of 5 pts in a week). Supposedly, even Romney's campaign was refusing to believe how poorly he was doing in the battlegrounds, although this is likely not a true representation of their internals.