Electron beam melting (EBM) is a powder bed additive manufacturing process where a powder material is melted selectively in a layer-by-layer approach using an electron beam. EBM has some unique features during the manufacture of components with high-performance superalloys that are commonly used in gas turbines such as Alloy 718. EBM has a high deposition rate due to its high beam energy and speed, comparatively low residual stresses, and limited problems with oxidation. However, due to the layer-by-layer melting approach and high powder bed temperature, the as-built EBM Alloy 718 exhibits a microstructural gradient starting from the top of the sample. In this study, we conducted modeling to obtain a deeper understanding of microstructural development during EBM and the homogenization that occurs during manufacturing with Alloy 718. A multicomponent phase-field modeling approach was combined with transformation kinetic modeling to predict the microstructural gradient and the results were compared with experimental observations. In particular, we investigated the segregation of elements during solidification and the subsequent ''in situ'' homogenization heat treatment at the elevated powder bed temperature. The predicted elemental composition was then used for thermodynamic modeling to predict the changes in the continuous cooling transformation and time-temperature transformation diagrams for Alloy 718, which helped to explain the observed phase evolution within the microstructure. The results indicate that the proposed approach can be employed as a valuable tool for understanding processes and for process development, including post-heat treatments.