What are some examples of when Mathematics 'accidentally' discovered something about the world? I do not remember precisely what the equations or who the relevant mathematicians and physicists were, but I recall being told the following story. I apologise in advance if I have misunderstood anything, or just have it plain wrong. The story is as follows.

A quantum physicist created some equations to
  model what we already know about sub-atomic particles. His equations
  and models are amazingly accurate, but they only seem to be
  able to hold true if a mysterious particle,
  currently unknown to humanity, exists. 
More experiments are run and lo and
  behold, that 'mysterious particle' in actual fact exists! It was found to be a quark/dark-matter/anti-matter, or something of the sort.

What similar occurrences in history have occurred, where the mathematical model was so accurate/good, that it 'accidentally' led to the discovery of something previously unknown? 
If you have an answer, could you please provide the specific equation(s), or the name of the equation(s), that directly led to this?
I can recall one other example.

Maxwell's equations predicted the existence of radio waves, which were
  then found by Hertz.

 A: Quasicrystals.  Aperiodic tilings of the plane and space were discovered by mathematicians, starting from Robert Berger's work on Wang tiles in the $1960$'s.  Physical materials exhibiting these properties were found in the $1980$'s by Dan Shechtman, who won the Nobel Prize for Chemistry in $2011$ for this work.
A: Arago's spot is a classical (and classic) example of a beautiful mathematical theory anticipating a beautiful physical fact.  Briefly, the story goes like this: Back in the 1800's, scientists were debating whether light was a particle or a wave.  Following some convincing experiments by Young showing wave-like properties of light, Fresnel developed a mathematical wave theory of light to describe the properties exhibited in those experiments.  He submitted his theory in a competition, where it was reviewed by Poisson, who was a supporter of the particle theory of light.  Poisson wanted to prove it wrong, and so he fiddled with the math until he discovered an effect predicted by the theory (hitherto not noticed by Fresnel) which he thought was inconsistent with experiments: The theory predicted that if you shine light at an opaque disk, there would be a bright spot in the middle of the shadow cast by the disk.  
It turned out that no one had actually done an experiment of this type before.  So following Poisson's prediction, Arago went and did the experiment, and voila!  The spot was there!  So Poisson's attempt to kill the wave theory of light ended up becoming one of the strongest pieces of evidence in favor of light's wave nature.  

A: After the war Richard Feynman was no longer working at Los Alamos. In October 1946 his father died and Feynman went through a period of depression and burn-out. Unable to focus on research problems, Feynman began tackling physics problems, not for utility, but for self-satisfaction and fun. As he describes it in Surely You’re Joking, Mr. Feynman: Now that I am burned out and I'll never accomplish anything, I've got this nice position at the university teaching classes which I rather enjoy, and just like I read the Arabian Nights for pleasure, I'm going to play with physics, whenever I want to, without worrying about any importance whatsoever. One of these involved analyzing the physics of a wobbling plate as it is moving through the air, inspired by an incident in the cafeteria at Cornell when someone tossed one in the air. His work during this period used equations of rotation to express various spinning speeds and applying this to electrons and to quantum electrodynamics. The Feynman diagrams and the whole business he got the Nobel Prize for in 1965 came from that piddling around with the wobbling plate.
A: Enrico Fermi wrote in a letter to a friend,"I have have done a very bad thing. I Have invented a particle that cannot be detected."
The problem was that in nuclear radioactive decay, or in particle/anti-particle annihilation, the equations for energy and for momentum were inconsistent, as the relation between energy and momentum for photons is different from that for particles with inertia. Fermi proposed a massless  uncharged particle, which was a mathematical fudge factor, to account for this. The alternative would have been to alter the original equations, but there was a lot of theoretical "weight" behind them. 
His "undetectable particle" was the neutrino.
A: Science News article accidental astrophysicists 13 June 2008 explains how a math proof became a physics proof of gravitational lensing.
A: The memristor, the fourth passive electronic component (to accompany the resistor, capacitor, and inductor), was predicted by Leon Chua in 1971. An anomalous signal found by engineers in HP Labs in 2008 was, after much consternation, eventually attributed to the discovery of the memristor.
The prediction follows from the relationship between voltage, charge, current, and flux, neatly represented in the following diagram:

A: It seems that the (surprising) determination that light travels at finite (rather than infinite) speed, based on some nifty mathematical footwork, qualifies as such an example.
A: During World War 2,  a Hungarian mathematician by the name of Abraham Wald was called upon to provide advice on how to minimize bomber losses to enemy fire. There was an inclination within the military to consider providing greater protection to parts that received more damage but Wald made the assumption that damage must be more uniformly distributed and that the aircraft that did return or show up in the samples were hit in the less vulnerable parts.
However, Wald noted that the study only considered the aircraft that had survived their missions—the bombers that had been shot down were not present for the damage assessment. The holes in the returning aircraft, then, represented areas where a bomber could take damage and still return home safely. 
Wald proposed that the Navy instead reinforce the areas where the returning aircraft were unscathed since those were the areas that, if hit, would cause the plane to be lost. His work is considered seminal in the then-fledgling discipline of operational research.
Source - Abraham Wald
A: John von Neumann discovered some of the fundamentals of molecular biology back in the 1940s long before the field of molecular biology even existed. When von Neumann was developing his theory on universal constructors (UCs), machines that can build any possible physical structure including making copies of itself, he stumbled on a generic problem. The machine executes some algorithm that is stored in the form of an instruction set that has to be interpreted. This tells the machine how to perform the tasks it has to perform, including how to make a copy of itself.
The problem is then that to copy the instruct set would seem to require another instruction set. But then one shifts the problem to that other instruction set. The only way out is for the instruction set to be copied verbatim. Now, for the instruction set to be copied verbatim requires the presence of a supervisor unit which decides which of the two roles the instruction set is to play. As pointed out here:

To be functional over successive generations, a complete self-replicating automaton must therefore consist of three components: a UC, an (instructional)
  blueprint, and a supervisory unit. To rough approximation, all known life contains these three components, which is particularly remarkable, given that von Neumann formulated his ideas before the discoveries of modern molecular biology, including the structure of DNA and the ribosome. From the insights provided by molecular biology over the past 50 years, we can now identify that all known life functions in a manner akin to von Neumann automaton, where DNA provides a (partial) algorithm, ribosomes act as the core of the universal constructor and DNA polymerases (along with a suite of other molecular machinery) play the role of supervisory unit [65, 54].

A: Dirac explains here how special relativity led to the Dirac equations for the electron which predicts its spin, magnetic moment and the existence of the positron.
A: The most notable ones that come to my mind at present are the Special Theory of Relativity and the General Theory of Relativity, both by Albert Einstein. Although Einstein published them in 1905 and 1915 respectively, the mathematical work of the theory had been done a long time before by  Hendrik Lorentz, Henri Poincaré, and Hermann Minkowski. Einstein just had to put forward the proper justification and implication of the mathematics in the real, physical world.
Then again, you have the mathematics behind the behaviour of black holes which was developed by Ramanujan early in the $1900$s when no one was even aware of the existence of black holes. It was later predicted by Einstein in his GTR. And work was carried on by Kerr, Hawking, Thorne, Susskind and others even later.
A: The  Fermi-Pasta-Ulam numerical experiments in the 1950's that led to theory of integrable systems.    One day the computer simulation was accidentally left running longer than intended, showing that a nonlinear wave system almost returned to its original state instead of thermalizing. The theory that developed from this is enormous and applications include soliton pulses sent through optical fiber (hence internet and cable television).
A: Berry's Phase is a good example of mathematics uncovering new physics. In particular, a derivation in quantum mechanics assumed a one-dimensional domain in an integration. If the parameter space is higher-dimensional then the parameter domain can have nontrivial topology which ultimately leads to a nontrivial integral. This integral implies we can manipulate the phase of a wavefunction. In particular, you can split a light beam and use the concept of Berry's phase to create two beams which differ in phase however you wish. There are several thousand papers which follow from Berry's discovery in the early 1980's (as seems to always be the case, a less-known researcher also found in in the mid 1950's, see this Wikipedia article for more details)
A: I believe the story mentioned in the question is the story of the $\Omega^-$ particle, conjectured to exist by Gell-Mann and Ne'eman (see Here and Here) as part of a representation-theoretic approach to quantum mechanics, and eventually discovered by a team at Brookhaven. 
There's a nice video about this

Of course, there's probably many other examples of this phenomenon in quantum mechanics - certainly the discovery of the Higgs should qualify - but this is still a really good example, and I suspect the one the OP is remembering.
A: The planet Neptune's discovery was an example of something similar to this. It was known that Newtons's Equations gave the wrong description of the motion of Uranus and Mercury. Urbain Le Verrier sat down and tried to see what would happen if we assumed that the equations were right and the universe was wrong. He set up a complicated system of equations that incorporated a lot of ways contemporary knowledge of the universe could wrong, including the number of planets, the location and mass of the planets, and the presences of the forces other than gravity. He would eventually find a solution to the equations where the dominating error was the presence of another, as of yet undetected, planet. His equations gave the distance from the sun and the mass of the planet correctly, as well as enough detail about the planet's location in the sky that it was found with only an hour of searching.
Mercury's orbit's issues would eventually be solved by General Relativity.
A: Bell's theorem on the foundations of quantum mechanics showed that not all philosophical questions are impervious to experiment, to the extreme surprise of pretty much every physicist on Earth.  (It also showed that Einstein was soundly wrong, which some people might also find surprising.)
A: The Titius–Bode law (sometimes termed just Bode’s law)
was an observation that
the radius of the orbit of the $n\rm th$ planet in our solar system
could be approximated by the formula
$$r_n=(r_1+0.3\times 2^{(n-2)})\rm AU$$
for $n>1$, where “AU” represents an Astronomical Unit;
i.e., the radius of Earth’s orbit (i.e., $r_3$).
Setting $r_1$ to the approximation $0.4$,
this formula gives the following values:
\begin{align}
r_1&=&0.4 \text{ AU}&\qquad&&\text{The radius of Mercury’s orbit is } 0.39 \text{ AU}\\
r_2&=&0.7 \text{ AU}&\qquad&&\text{The radius of Venus’s orbit is } 0.72 \text{ AU}\\
r_3&=&1.0 \text{ AU}&\qquad&&\text{The radius of Earth’s orbit is } 1.00 \text{ AU}\\
r_4&=&1.6 \text{ AU}&\qquad&&\text{The radius of Mars’s orbit is } 1.52 \text{ AU}\\
r_5&=&2.8 \text{ AU}&&&\\
r_6&=&5.2 \text{ AU}&\qquad&&\text{The radius of Jupiter’s orbit is } 5.20 \text{ AU}\\
r_7&=&10.0 \text{ AU}&\qquad&&\text{The radius of Saturn’s orbit is } 9.55 \text{ AU}\\
r_8&=&19.6 \text{ AU}&\qquad&&\text{The radius of Uranus’s orbit is } 19.22 \text{ AU}\end{align}
The realization that there was a gap prompted a search of the area $r_5$ from the Sun, which led to the discovery of the asteroid belt (the radius of the orbit of Ceres is 2.77 AU).
The formula broke down after Uranus. 
The radius of Neptune’s orbit is less than 80% of what the formula predicts;
the radius of Pluto’s orbit is only about 1% more than
what the formula predicts for Neptune ($r_9$).
A: I agree with some of the comments that the likely basis for this fuzzy memory is the Dirac "prediction" of positrons (the first known instance of anti-matter). However, slightly before Dirac's 1926 publication of a relativistic wave equation with negative energy states (which he didn't initially believe were "physical", so calling it a "prediction" was only done in retrospect), there was a earlier prediction about the nature of matter. The notion that "particles" might have wave characteristics was a prediction by de Broglie (1923) based on the mathematical relations described by Planck  (~ 1900) and Einstein (1905) relating to the quantization of energy and teh energy-mass equivalence, and also a consequence of the Schrödinger equation (1925) for "electron wave functions" and subsequently the wave nature of "particles" confirmed by the 1927 Davisson–Germer experiments with electron diffraction by crystals.
It later turned out that even macro-molecules as big as Bucky-balls (C_60) could be shown to exhibit wave-like interference in double-slit experiments, implying that some part of the molecule goes through both slits.
A: Here's a rather different example which came up recently (see the Journal of Recreational Mathematics):
A couple of mathematicians were studying juggling.  They came up with a way to encode the 'ball catch' patterns as simple numeric sequences.  Then they derived the sequences for all known juggling patterns, and inferred from them a set of rules governing which number sequences can be legal 'juggling' sequences and which cannot.  Then they worked the rules backwards, and re-derived all the sequences that they had started with - plus one other.  It then turned out that it is in fact possible to juggle according to that extra number sequence.  In fact, one of the mathematicians described the resulting juggle motion as 'hauntingly beautiful'.
Think - just a little simple fiddling with numbers uncovered a way to juggle that had gone unnoticed for thousands of years.
A: Many results in the answers so far are examples from quantum physics. However there is also the example of quantum physics. As far as I remember, Planck wanted to explain the spectrum of black body emission by calculating a limit $\lim_{h\to 0}$ of a discretization. However, the results would only make sense if instead of letting $h\to 0$, he kept $h$ positive. The letter $h$ is still used for the Planck quantum.
A: Kepler's attempted to match the orbits of the planets to a nested arrangement of platonic solids. Eventually, his data led him to the mathematics of Kepler's Laws.
Kepler wasn't impressed by his three laws, but Newton found them in his papers.
(from my post elsewhere)
A: Write down Maxwell's equations in a vacuum:
$$\nabla \cdot \vec{E}=0$$
$$\nabla \cdot \vec{B}=0$$
$$\nabla \times \vec{E}=-\frac{\partial \vec{B}}{\partial t}$$
$$\nabla \times \vec{B}=\mu_0\epsilon_0\frac{\partial \vec{E}}{\partial t}$$
Note the vector identity $\nabla\times(\nabla \times \vec{X})=\nabla(\nabla\cdot\vec{X})-\nabla^2\vec{X}$.  
Apply this to the third and fourth equations to get:
$$\frac{\partial^2 \vec{E}}{\partial t^2}=\frac{1}{\mu_0 \epsilon_0}\nabla^2 \vec{E}$$
$$\frac{\partial^2 \vec{B}}{\partial t^2}=\frac{1}{\mu_0 \epsilon_0}\nabla^2 \vec{B}$$
That is the electric and magnetic fields satisfy the wave equation. That is, electromagnetic waves exist! Further, since $\frac{1}{\mu_0\epsilon_0}=c^2$, we know they travel at the speed of light.
A: Differential calculus was being developed by Leibniz and Newton in the 17-18th centuries at roughly the same time as Newton formulated his famous equations for mass, force and acceleration governing mechanical motion. 
I wonder what such laws would have looked like without having any differential and integral calculus available!
A: There have been many attempts to prove Euclid's Parallel Postulate, which for around 2000 years was stumping many Mathematicians. Eventually it took Gauss to completely redevelop the notion of some of the equivalent properties in his development of hyperbolic geometry. Whilst it is true to say that Gauss' endeavours were not found by accident; it is true to say that the years of failure led to a new way of thinking.
A: An example from Linguistics: Heller and Macris, in their book “Parametric Linguistics” arranged known sounds in a grid (matrix), in which a missing sound (blank cell) was obvious, and that is how this sound was discovered. (My memory is a little rusty on this, but it goes something like that.)
A: I did a quick scan and saw no mention of Riemannian manifolds here. Historically, it might've been the exact high-precision mathematical machinery that Einstein needed; from this  this wikipedia link:

Albert Einstein used the theory of Riemannian manifolds to develop his
  general theory of relativity. In particular, his equations for
  gravitation are constraints on the curvature of space.

