Corrosion morphology prediction for civil infrastructure using physics-based simulation is computationally challenging due to the coupled multi-physics simulations involved in long-term corrosion prognostics. Machine learning (ML)-based surrogate modeling provides a promising way of overcoming this challenge. This paper presents a physics-constrained ML method for surrogate modeling of a high-fidelity multi-physics pitting corrosion simulation, which is solved using a phase-field method. The proposed surrogate model consists of a convolutional variational autoencoder to reduce the dimension of pitting corrosion shape images and a Bayesian multi-layer perceptron network (also known as the Bayesian Latent Space Time Evolution Network) to model the evolution of the corrosion pit morphology over time. To account for the fact that corrosion damage without repair is an irreversible process, a physics constraint is added to the surrogate model to ensure that the corrosion rate is strictly negative. The proposed physics-constrained surrogate modeling method is compared with a purely data-driven surrogate modeling method which integrates a convolutional neural network autoencoder with a Gaussian process regression (GPR) model-based nonlinear autoregressive exogenous model. The results show that the proposed physics-constrained surrogate model is significantly more accurate than the purely data-driven GPR-based surrogate model.