I'm interested mainly in mathematical and related fields, in which several important and famous open questions exist (e.g., Riemann Hypothesis). Almost every day a new "amateur" scholar (meaning, someone with no formal affiliation to a reputable research institute, or someone who does not have any track record of peer-reviewed publications in reputable journals or conferences in the area) publishes into cyber-space a new manuscript alleged to solve a major open problem in mathematics or related fields. Some established researchers then consider this a work of "cranckery" (i.e., an amateur attempt that is not only false, but is mostly meaningless and hence impossible to verify since the argument is so confused and unstructured that it is hard to identify any meaningful statement to verify). On the other hand, the amateur would usually claim that his/her proof is correct, and would feel frustrated that the established scholars ignore his/her breakthrough, perhaps because they are "outsiders", or that it is harmful for the "establishment" to acknowledge the breakthrough.
This leads to a simple question: is there a single example in the last 30 years in which such an amateur whose work was considered a crank when published, was in retrospect vindicated and proved correct?
Clarifications: examples of somewhat less known, but still established academics with a track record and an affiliation, who solved a moderately big open question do exist. I'm asking about a clear person identified as a "crank" whose work was then proved to be correct.
EDIT: I decided to accept Dan Romik's answer as the closest to a complete answer to my question. There were many good and surprising answers that I didn't know about. But my criteria were somewhat strict, so none of those fall within the desired quest: an (1) amateur, i.e., someone with NO research affiliation (2) whose work of a mathematical nature was (3) considered a "work of crank" (even when extending the time limit to ~80 years back, to make sure "affiliation" and "crank" have the same meaning as today).
The closest example is indeed Dan Shechtman's work that was dismissed as pseudoscience. But Shechtman was a researcher with a clear and respected affiliation. And as Dan Romik's comments, theories that are considered "crankery" at first can be vindicated in retrospect in the natural sciences, but much less so in mathematics. So Shechtman falls in both math and no affiliation criteria.
Another great example is that of 1952, Kurt Heegner, which I didn't know about. I would have accepted this I believe, had I not read in comments that Heegner was in fact considered a serious mathematician and not an amateur or an outsider.
Yitang Zhang's example is also close, but although he wasn't considered an established researcher, his work when published was never considered "crankery" as far as I know, but quite immediately identified as an important contribution.