An explicit definition of uniform continuity was first published by Heine in Über Trigonometrische Reihen (On Trigonometric Series), Journal für die Reine und Angewandte Mathematik, 71 (1870), pp. 353–365. And two years later he published a proof that a function continuous on a closed interval is uniformly continuous there in Die Elemente der Functionenlehre (Elelements of Function Theory), Journal für die Reine und Angewandte Mathematik, 74 (1872), pp. 172–188. However, as Rusnock and Kerr-Lawson point out in Bolzano and Uniform Continuity: "He claimed no originality in these papers, however, and as it turns out his proof is an almost verbatim transcription of one given by Dirichlet in his lectures on definite integrals in 1854". They further argue:
"The concern of this note, however, is to establish that Bolzano has a legitimate claim to priority. We intend to show, in particular, that he not only grasped the notion of uniform continuity but also gave an adequate characterization of the concept, stated and proved Theorem 2 [a function can be continuous on an open interval without being uniformly continuous there], and stated Theorem 1 ["Heine's"] in addition to providing a useful fragment of its proof."
Sinkevich offers more details on Cantor's role in the genesis of the concept and the theorem in On the History of Epsilontics:
"In 1872, Eduard Heine in «Die Elemente der Functionenlehre» gave a definition of the limit function using Cantor’s fundamental sequences. Every convergent sequence was represented as the sum of its limit and the elementary (decreasing) sequence. On this basis, Heine formulates the condition of continuity, the definition of uniform
continuity in terms of $\epsilon-\delta$, the theorem of uniformly continuous functions and as a method of proof of there was cover lemma. The theorem of uniformly continuity was necessary for intervals between irrational number and its limit, the rational number. (It was formulated by Cantor, as Heine wrote. Now it is Cantor-Heine theorem)."