The Swift–Hohenberg (SH) and phase-field crystal (PFC) models are minimal yet powerful approaches for studying phenomena such as pattern formation, collective order, and defects via smooth order parameters. They are based on a free-energy functional that inherently includes elasticity effects. This study addresses how gradient elasticity (GE), a theory that accounts for elasticity effects at microscopic scales by introducing additional characteristic lengths, is incorporated into SH and PFC models. After presenting the fundamentals of these theories and models, we first calculate the characteristic lengths for various lattice symmetries in an approximated setting. We then discuss numerical simulations of stress fields at dislocations and comparisons with analytic solutions within first and second strain-gradient elasticity. Effective GE characteristic lengths for the elastic fields induced by dislocations are found to depend on the free-energy parameters in the same manner as the phase correlation length, thus unveiling how they change with the quenching depth. The findings presented in this study enable a thorough discussion and analysis of small-scale elasticity effects in pattern formation and crystalline systems using SH and PFC models and, importantly, complete the elasticity analysis therein. Additionally, we provide a microscopic foundation for GE in the context of order-disorder phase transitions.