We construct the Hamiltonian dynamics of a generalized spherically symmetric gravitational model in extended phase space. We start from the Faddeev-Popov effective action with gauge-fixing and ghost terms, making use of gauge conditions in the differential form. It enables us to introduce the missing velocities into the Lagrangian and then to construct a Hamiltonian function according to the usual rule applied for systems without constraints. The main feature of Hamiltonian dynamics in extended phase space is that it can be proved to be completely equivalent to the Lagrangian dynamics derived from the effective action. We find a BRST-invariant form of the effective action by adding terms which do not affect the Lagrangian equations. After all, we construct the BRST charge according to the Noether theorem. Our algorithm differs from that by Batalin, Fradkin and Vilkovisky, but the resulting BRST charge generates correct transformations for all gravitational degrees of freedom including the gauge ones. The generalized spherically symmetric model simulates the full gravitational theory much better then models with a finite number of degrees of freedom, so that one can expect the appropriate results in the full theory.