A model for simulating mushy zone resolidification in a temperature gradient is presented. For describing macroscopic mass transport in the liquid phase in the mushy zone, an extended diffusion equation is solved numerically using the Finite Difference Method. Temperature dependent local equilibria at each position in the mushy zone are calculated using the thermodynamic software package ChemApp. The resolidification model treats multicomponent alloying systems and accounts for multiphase equilibria. Simulation results for peritectic Cu-40wt%Al and eutectic Al-5wt%Si-1wt%Mg alloys are compared with microstructures from temperature gradient annealing experiments. It is shown that the model is well suited to predict mushy zone resolidification in multicomponent and multiphase alloys. The predicted evolution of the liquid fraction is qualitatively in full agreement with the observed microstructures, including local remelting at the peritectic temperature prior to resolidification, an effect that was first predicted by the model and confirmed by the experiments.