The phase diagram of a two-dimensional N-site N-electron system (N\ensuremath{\gg}1) with site-diagonal electron-phonon (e-ph) coupling is studied in the context of polaron theory, so as to clarify the competition between the superconducting (SC) state and the charge-density wave (CDW) state. The Fermi surface of noninteracting electrons is assumed to be a complete circle with no nesting-type instability in the case of weak e-ph coupling, so as to focus on such a strong coupling that even the standard ``strong-coupling theory'' for superconductivity breaks down. Phonon clouds moving with electrons as well as a frozen phonon are taken into account by a variational method, combined with a mean-field theory. It covers the whole region of three basic parameters characterizing the system: the intersite transfer energy of electron T, the e-ph coupling energy S, and the phonon energy \ensuremath{\omega}. The resultant phase diagram is given in a triangular coordinate space spanned by T, S, and \ensuremath{\omega}. In the adiabatic region \ensuremath{\omega}\ensuremath{\ll}(T,S) near the T-S line of the triangle, each electron becomes a large polaron with a thin phonon cloud, and the system changes discontinuously from the SC state to the CDW state with a frozen phonon as S/T increases. In the inverse-adiabatic limit \ensuremath{\omega}\ensuremath{\gg}(T,S) near the \ensuremath{\omega} vertex of the triangle, on the other hand, each electron becomes a small polaron, and the SC state is always more stable than the CDW state, because the retardation effect is absent. Thus, the polaron radius decreases and the SC region expands in the triangle as T/\ensuremath{\omega} decreases. It is found, for the first time, that the energy gap of the SC state for a given T and S becomes maximum at the intermediate region \ensuremath{\omega}\ensuremath{\sim}T, indicating the importance of the polaron effect. The collective excitation within the gap of the SC state is also studied by the random-phase approximation, and is found to change its nature continuously from the pair-breaking type to the superfluid type as S/T increases.