By analogy:
The epicycles of Ptolemy explained the known facts in the sun system and in this sense were not "wrong". But they distracted from a better insight. From another viewpoint, everything fell neatly into place.  

Do you have examples from pure math? Again, you have a theory, it's OK in the sense that it gives the answers you want, but it's hopelessly contrieved, and suddenly someone sees the stuff from another viewpoint and everything becomes ridiculously simple? 


It's quite probable a comparable question with other wording has already been asked, a link then would suffice. :-)


(QUICK EDIT as long as it's hot: While I already upped an answer with nice examples, I also would be interested which "current" theories you see as epicyclic and in need of a Kopernikus/Kepler/Newton. Remember, soft question, a lot of esthetics is involved in the judgment.)



"Epicycles" (Ptolemy style) in math theory?
Euler found values of the Riemann zeta-function by artful manipulations of divergent series, e.g., interpreting a function that's $(-1)^{n/2}$ at even $n > 0$ and $0$ at odd $n > 0$ as $\cos(\pi n/2)$. The calculations were later justified by analytic continuation of the zeta-function from the right half-plane ${\rm Re}(s) > 1$ to the whole complex plane. This led him to discover the functional equation of the zeta-function over 100 years before there was a suitable language for it to be properly expressed. None of this is done by divergent series anymore (except as heuristic explanations on YouTube to show why $1 + 2 + 3 + \cdots = -1/12$).


Early proofs of the quadratic reciprocity law are like epicycles. The first proof by Gauss was a horrible induction. It verifies the theorem, but in a very opaque way. While Tate later used ideas from that proof when he was computing a $K$-group, it's fair to say the proof by Gauss was really ugly. Much slicker proofs were found later, including by Gauss himself. For that matter, Gauss composition of quadratic forms was a very difficult topic until it later got reinterpreted as multiplication in a (narrow) ideal class group.


The way Galois constructed general finite fields (of non-prime size) could be considered epicyclish, in the sense that he created new "symbols" subject to algebraic rules, but there was no clear definition of what these symbols were. Much later his construction could be treated as an instance of quotient rings: $\mathbf F\_p[x]/(\pi(x))$ for an irreducible $\pi(x)$ instead of $\mathbf F\_p(\alpha)$ where $\alpha$ is a "symbol" subject to the rule $\pi(\alpha) = 0$. The advantage of the latter language is that it removes any doubt about the legitimacy of calculations made with these formal symbols.


Kummer's creation of ideal theory was pretty obscure to his contemporaries. He built what he called "ideal prime numbers" for cyclotomic fields essentially by defining what today we'd call the discrete valuations associated to the (nonzero) prime ideals of the ring of integers in those fields, but without being able to say what the prime ideals themselves were. Later Dedekind came along and defined ideals as actual subsets of the ring of integers of a number field, showed how to multiply them to get unique prime ideal factorization, and Kummer's "ideal numbers" largely vanished into history.


Some aspects of the development of algebraic geometry fall into this category as well, comparing the era when Weil's "Foundations of Algebraic Geometry" was the dominant language with Grothendieck's language of schemes that replaced it. Kedlaya's notes <http://ocw.mit.edu/courses/mathematics/18-726-algebraic-geometry-spring-2009/lecture-notes/MIT18_726s09_lec01_intro.pdf> even mention the analogy Weil's Foundations <-> epicycles and schemes <-> Galileo and Kepler. 


