Finding an action that gives you dust when varied is actually kind of tricky. Part of the reason it is hard is that for scalar matter, the action is usually proportional to the pressure,and the pressure vanishes for dust. I'm not sure where you found your action for dust, but I think you didn't make any calculational errors, it just isn't the right action.
There are two ways I know to get dust from an action. You have to make sure to specify the fields in your theory, and then take the variations of all of them and enforce their equations of motion. The first way is to choose a nondynamical vector field $v^a$ (which means we do not enforce it's equation of motion) and a dynamical scalar field $\rho$, and write the action
$$S = - \int d^4x\sqrt{-g} \frac\rho2(g_{ab}v^av^b+1)$$
Varying with respect to $\rho$ enforces that $v^a$ be unit timelike, $v^a v_a = -1$. Now when you vary with respect to the metric, the term you get from varying $\sqrt{-g}$ is proportional to $g_{ab}v^a v^b + 1$, which vanishes since $v^a$ is unit. The only remaining term comes from varying $g_{ab}$ contracting with $v^a v^b$, which gives
$$ \frac{\delta S}{\delta g_{ab} }= -\frac\rho2 v^a v^b$$
and hence the stress tensor is
$$ T^{ab} = \rho v^a v^b.$$
The second method is similar and has the advantage of not using a nondynamical field. It is described in a paper found here. This consists of introducing two scalar fields $\lambda$ and $\varphi$. The action is
$$S=\int d^4x \sqrt{-g} \lambda\left(\frac12g^{ab}\partial_a\varphi \partial_b\varphi - \frac12\mu^2(\varphi)\right) $$
Varying with respect to $\lambda$ will give
$$\partial_a\varphi \partial^a \varphi = \mu^2(\varphi)$$
Again, we see that when this equation is enforced it will cause the variation of $\sqrt{-g}$ in the stress tensor to drop out. Then the stress tensor is
$$T_{ab} = \lambda\partial_a\varphi \partial_b \varphi. $$
Then defining the unit $4$-velocity by $v_a = \dfrac{\partial_a\varphi}{(\partial_a\varphi \partial^a\varphi)^{1/2}}=\dfrac{\partial_a\varphi}{\mu(\varphi)}$, we see that the stress tensor take the form
$$T_{ab} = \lambda \mu^2 v_a v_b$$
which is pressureless dust with energy density $\lambda\mu^2$. The final $\varphi$ equation of motion determines the evolution of $\lambda$ and $\varphi$.