There is the famous mistake of Lebesgue. Quoting from Descriptive Set Theory: Second Edition by Yiannis N. Moschovakis , page 2: "Lebesgue's argument was “simple, short but false.” The wrong step in the proof was hidden in a lemma taken as (basically) trivial, that a set in the line which is the projection of a Borel measurable set in the plane is itself Borel measurable. Ten years later the error was spotted by Suslin, then a young student of Lusin at the University of Moscow, who rushed to tell his professor in a scene charmingly described in Sierpinski [1950]. Suslin called the projections of Borel sets analytic and showed that indeed there are analytic sets which are not Borel measurable. Together with Lusin they quickly established most of the basic properties of analytic sets..."
Mikhail Suslin died before his 25th birthday, and only published a few pages during his lifetime, but his discovery of Lebesgue's error and the fundamental way he addressed it, laid the foundation of descriptive set theory.
https://en.wikipedia.org/wiki/Mikhail_Suslin
https://en.wikipedia.org/wiki/Analytic_set
Edit: Following a question from @KurtG. in the comments, I add below the precise relevant quote from Sierpinski (1950) (http://www.numdam.org/item/MSM_1950__112__1_0.pdf):
"Par hasard j'étais présent au moment où Michel Souslin communiqua à M. Lusin sa remarque et lui donna le manuscrit de son
premier travail. C'est tout simplement que M. Lusin a traité le
jeune étudiant qui lui a déclaré avoir trouvé une faute dans un
Mémoire d'un savant éminent. Je fus aussi un des premiers qui,
immédiatement après M. Lusin à lu les manuscrits de Michel Souslin ;
je sais donc bien combien M. Lusin a aidé son élève et comme il le
guidait dans ses recherches. Les ensembles analytiques sont appelés
par plusieurs auteurs ensembles de Souslin : il serait plus juste de
les appeler ensembles de Souslin et Lusin.
M. Souslin ne se contenta pas de constater que le lemme de
M. Lebesgue est faux. Il se mit à examiner si les conséquences que
M. Lebesgue en a déduites étaient vraies. Une d'elles était la proposition de M. Lebesgue qu'une projection sur une droite d'un ensemble
plan mesurable B est mesurable B [ce qui résulterait immédiatement
du (faux) lemme de M. Lebesgue sur la projection d'un produit
descendant d'ensembles, vu que la projection d'une somme (quelconque) d'ensembles est la somme des projections de ces ensembles
et que la projection d'un rectangle est un segment]. Pour construire
un exemple d'un ensemble plan mesurable B dont la projection est
non mesurable B, M. Souslin a créé toute une théorie qu'il appela
théorie des ensembles (A) (analytiques).
Cette théorie a été ensuite simplifiée et développée par M. Lusin
qui a aussi démontré à l'aide d'elle que le théorème de M. Lebesgue
sur l'inversion des fonctions représentatives analytiquement, bien
que déduit d'un lemme faux, est cependant vrai."
Approximate English translation:
"By chance I was present when Mikhail Souslin communicated his remarks to Mr. Lusin and gave him the manuscript of his
first work. Mr. Lusin took quite seriously the
young student who told him that he had found a fault in a
Memoir of an eminent scholar. I was also one of the first who,
immediately after Mr. Lusin, read the manuscript of Mikhail Souslin; I therefore know well how much Lusin helped his pupil and how he guided his research. Several authors use the term "Souslin sets" for the class of analytic sets; I believe it would be fairer to call them Souslin-Lusin sets.
M. Souslin was not satisfied with noting that the lemma of
H. Lebesgue is wrong. He began to examine whether the consequences Lebesgue inferred from the lemma were true. One of them was Lebesgue's proposition that a projection on a line L of a Borel set in the plane, is a Borel set in L [which would immediately result from the (false) lemma of H. Lebesgue on the projection of the intersection of a descending sequence of sets, since the projection of any union of sets is the union of the projections of these sets, and the projection of a rectangle is a segment].
To build an example of a Borel measurable planar set whose projection is not a Borel set, Mr. Souslin created a whole theory which he called the theory of analytic (A) sets.
This theory was then simplified and developed by Lusin,
who also demonstrated, with Suslin's assistance, that the theorem stated by Lebesgue concerning implicitly analytically definable functions is true, although it was originally inferred from a false lemma."