Gauss' law is applicable for a finite wire. But, it's useless in this case.
In the infinite example, you assume some things due to symmetry, namely:

It's pretty obvious why these things can be assumed--moving up and down the wire should not change $\vec E$, so we take it constant. Also, there should be no direction bias, so $\vec E$ has no component along the wire.
In this way, $\oint \vec E.\mathrm dS\to\oint|\vec E|\mathrm dS_{curved}$ (since it's perpendicular), and then $\oint|\vec E|\mathrm dS_{curved}\to |\vec E| \oint\mathrm dS_{curved}$ (since it's constant at a given radius)
Once E is outside the integral, we can easily integrate the $\mathrm dS_{curved}$ term.
On the other hand, for a finite wire, we have:

The translational symmetry along the wire is lost (while the symmetry under rotations and the symmetry under reflection through the origin are preserved), and the form of $\vec E$ is not predictable{*}.
So we can't remove the dot product, and we can't take $\vec E$ out of the integral. Since the integral is a closed integral, it is sort of like a definite integral in that we can't just differentiate the equation to get an answer. So we can't solve the Gauss' law integral, so we're stumped. You have to use Coulomb's law and find it by taking elements.
*$\vec E=\frac{k\lambda}{R}\left((sin\alpha+sin\beta)\hat e_r +(cos\alpha-cos\beta)\hat k\right)$. See? Not predictable.