You are right in saying that the electric field near a point charge is infinite, but that is not the case for continuous volume charge distributions. The best example is a charged solid sphere. Although the solid sphere has charge, still you can define electric field inside the sphere at any point and this electric field is finite, not infinite. And thus if you apply Gauss' Law to a surface which covers an infinitesimally small volume, you will arrive at the differential form of Gauss' Law.
Derivation
Let's take the surface of an infinitesimally small cuboid as our Gaussian surface. Let the dimensions of the cuboid be $\mathrm d x$, $\mathrm d y$ and $\mathrm d z$. Now let's find the flux through this cuboidal surface.
$$\phi= (E_{x+\mathrm d x}-E_x)\,\mathrm d y\,\mathrm d z + (E_{y+\mathrm d y}-E_y)\,\mathrm d z\,\mathrm d x +(E_{x+\mathrm d z}-E_z)\,\mathrm d x\,\mathrm d y$$
But by Gauss' Law,
$$\phi=\frac{q_{\text{enclosed}}}{\varepsilon_0}$$
Therefore,
$$(E_{x+\mathrm d x}-E_x)\,\mathrm d y\,\mathrm d z + (E_{y+\mathrm d y}-E_y) \,\mathrm d z\,\mathrm d x +(E_{x+\mathrm d z}-E_z)\,\mathrm d x\,\mathrm d y = \frac{\rho\,\mathrm d V}{\varepsilon_0}$$
But $\mathrm dV = \mathrm d x\,\mathrm d y\,\mathrm d z$ and $E_{q+\mathrm d q}-E_q=\mathrm dE_q \:\:\forall \: q = x,y,z$, so
$$\mathrm d x\,\mathrm d y\,\mathrm d z \left(\frac{\mathrm d E_x}{\mathrm dx}+\frac{\mathrm d E_y}{\mathrm dy}+\frac{\mathrm d E_z}{\mathrm dz}\right)= \mathrm d x\,\mathrm d y\,\mathrm d z \frac{\rho}{\varepsilon _0}$$
Also, here we will convert the differentials to partial differentials because $E_x$ might be a function of $y$ and $z$ as well and the same goes for other componenets. Therefore
$$\frac{\partial E_x}{\partial x}+\frac{\partial E_y}{\partial y}+\frac{\partial E_z}{\partial z}=\frac{\rho}{\varepsilon_0}$$
But the left hand side of the above equation is nothing but the divergence of the electric field $\mathbf{E}$. Thus,
$$\nabla \cdot \mathbf{E}=\frac{\rho}{\varepsilon_0}$$