In discrete systems, the basis states are usually normalized to unity: $\langle\psi_i|\psi_j\rangle = \delta_{ij}$. In contrast, in the continuous case the states are normalized by Dirac delta function. For example, for the 1D particle
\begin{equation}
\langle x|x'\rangle = \delta(x-x'),
\end{equation}
which means that the norm of the state $|x\rangle$ is $\delta(0) = \infty$. This intuitively explains the emergence of infinitely small $dx$ in the integral.
A link between the continual and discrete cases can be made by considering a lattice approximation for the continuum as @LPZ commented. Assume that the particle on a line can occupy only discrete sites $x_k = k\Delta x$. For each site, there exists a corresponding ket vector $|x_k^{discr}\rangle$ normalized by unity:
\begin{equation}
\langle x_k^{discr} | x_{k'}^{discr}\rangle = \delta_{kk'},
\end{equation}
Arbitrary ket vector can be decomposed into a sum
\begin{equation}
|\psi\rangle = \sum_k c^{discr}_k |x_k^{discr}\rangle,
\end{equation}
where $\sum |c^{discr}_k|^2 = 1$. We would like to take the limit $\Delta x \to 0$ and replace the sums with the integral with the prescription
\begin{equation}
\sum_k \Delta x F(x_k) \to \int dx F(x)
\end{equation}
However, it is necessary to change the norms of the basis vectors and expansion coefficients for that.
First, the normalization of $|x_k^{discr}\rangle$ differs from the delta-function normalization which should be in the continuous limit. To fix this, let us introduce new rescaled ket vectors $|x_k\rangle = \frac{1}{\sqrt{\Delta x}}|x_k^{discr}\rangle$. Their scalar product is
\begin{equation}
\langle x_k | x_{k'}\rangle = \frac{\delta_{kk'}}{\Delta x} \to \delta(x_k - x_{k'})
\end{equation}
which approaches delta-function at $\Delta x \to 0$.
Also, let us rescale $c^{discr}_k$ as
\begin{equation}
c^{discr}_k = \sqrt{\Delta x}c(x_k).
\end{equation}
With new $|x_k\rangle$ and $c(x_k)$, the decomposition of $|\psi\rangle$ becomes
\begin{equation}
|\psi\rangle = \sum_k \Delta x \cdot c(x_k) |x\rangle \to \int dx \,c(x) |x\rangle,
\end{equation}
as usually defined for the continuous case.
The coeficients $c(x)$ are also normalized:
\begin{equation}
\sum \Delta x |c(x_k)|^2 \to \int |c(x)|^2 dx = 1.
\end{equation}