Dedekind actually in effect gave two different definitions of infinity.
Namely, first, as is well known, a set is Dedekind infinite if it is equinumerous with a proper subset of itself.
But second, Dedekind proved the famous categoricity result for the natural numbers, showing that the natural-number structure of the successor operation $\langle\mathbb{N},0,S\rangle$ is characterized up to isomorphism by the properties (1) zero is not a sucessor; (2) the successor operation is one-to-one; and (3) every number is generated from zero by successor, in the sense that if $X$ is a set with $0\in X$ and $n\in X\implies Sn\in X$, then every number is in $X$. This (second-order) theory is now known as Dedekind arithmetic, and Dedekind showed how to undertake definition by recursion and thereby to develop all the usual number theory and arithmetic in this structure. Peano famously provided a hugely successful and quite elegant development of the theory on the basis of Dedekind's axioms, and these days the theory is often attributed to Peano, even though Peano credits Dedekind.
The point is that the categoricity result defines what it means to be finite — a set is (numerically) finite if it is equinumerous with the predecessors of a natural number. A set is infinite, accordingly, if it is not finite.
It seems to me that Dedekind probably believed that his two definitions were equivalent, and indeed they are provably equivalent in ZFC. Nevertheless, we now know that this requires the axiom of choice (countable choice suffices), and it is consistent with ZF that there are numerically infinite sets that are Dedekind finite. It is the second definition (numerically infinite) that is usually taken as the right choice in contemporary mathematics.
Finally, let me mention my essay, Equinumerosity and the definition of finiteness, in which I discuss Aristotle, Galileo, Frege, Dedekind, Cantor, Tarski and others on the meaning of finiteness. Further discussion in my essay Potential versus actual infinity, which is freely available, and which brings in Archimedes, as well as ultrafinitism and the contemporary modal analysis of potentialism.