The Eliashberg theory is applied to study the critical temperature and a gap anisotropy of strongly coupled layered superconductors. The electron-ion pseudopotential, the electron, and the phonon energy spectra an proposed to be anisotropic in layered crystals with an open Fermi surface. The anisotropic electron-phonon spectral density [alpha(2)F(z)](pz) is found to be expanded in cos(np(z)d) functions. Such an expression for [alpha(2)F(z)](pz) demands the energy gap Delta(p(z),omega) to present also as an expansion in the harmonic functions. Therefore, the value of the energy gap along the c axis should display p(z) dependence. The value of Delta differs from that obtained by in-plane measurements. By using McMillan's method we present each amplitude Delta(n)(omega) in the harmonic expansion of the energy gap Delta(p(z),omega) by trial function. The infinite set of coupled homogeneous equations for Delta(0), Delta(1), Delta(2),... is obtained, the solution of which should yield the critical temperature. We estimate only those equations which include the three amplitudes, Delta(0), Delta(1), and Delta(2), in the harmonic expansion of the energy gap. An approximate calculation of T-c shows that the critical temperature must be enhanced due to the influence of anisotropy.