I hope this question is not a duplicate. I am motivated by wondering when widely accepted results may be considered have a secure place in the mathematical literature. The question is intended to refer to temporal gap. I am particularly interested in cases where a result generally recognised to be of interest has later turned out to be definitely false (eg by explicit demonstration of a counterexample). However, cases where a widely accepted "proof" has later been shown to be incorrect, yet the result has later been correctly proved are also of some interest (such as the 19th century example of a "proof" of the four colour theorem whose incorrectness went undetected for 11 years, although the theorem is now known to be true). The nature of this question may change over time as formal proof checking becomes more advanced.
There have been several historic 'proofs' of the parallel postulate in terms of Euclid's other four postulates, and it would be unsurprising if one of those holds the record:
In particular, Ptolemy 'proved' it about 300 years before Proclus discovered a flaw and (amusingly) replaced it with his own (equally invalid, naturally!) 'proof' of the parallel postulate. And I have no idea how long Proclus's proof subsequently survived before being debunked.
There is the proof put forward by Koenig in 1904 regarding a proof of the falsity of the continuum hypothesis was at first taken as possibly correct and depending on the thesis of Felix Bernstein, especially in the circle surrounding Hilbert.
Cantor himself could not judge whether this proof was correct, and it wasn't until Ernst Zermelo found the next the day that Koenig's results were not valid even based off of Bernstein's thesis. I am not sure if this gap between Koenig's purported proof and Zermelo's correction satisfies your request, but here is a link to my reference: http://www-history.mcs.st-andrews.ac.uk/Biographies/Konig_Julius.html