The Hill-Wheeler formula is applied to deriving the equation of state for finite nuclei with the Gogny effective interaction in the framework of Hartree-Fock theory. The reasonable zero-temperature saturation properties is obtainde, and the critical temperature for liquid-gas phase transition of finite nuclei is found to be around 12 MeV. In addition it is found that the phenomenological formula for surface energy used widely is not available when the density is far away from the normal nuclear density, and a new formula is suggested.