In this paper, we present a numerical algorithm based on new homotopy perturbation transform method (HPTM) to solve a time-fractional nonlinear shock wave equation which describes the flow of gases. The fractional derivative is considered in the Caputo sense. The HPTM is combined form of Laplace transform, homotopy perturbation method and He's polynomials. The nonlinear terms can be easily handled by the use of He's polynomials. The technique finds the solution without any discretization or restrictive assumptions and avoids the round-off errors. The obtained results are in good agreement with the existing ones in open literature and it is shown that the technique introduced here is robust, efficient, easy to implement and computationally very attractive.