The colloidal calcium–silicate–hydrate (C–S–H) gel largely controls the strength of concrete. However, little remains known about how the structural features of the C–S–H gel control its mechanical properties. Here, based on coarse-grained mesoscale simulations, we investigate the effect of grain polydispersity and structural disorder on the nanomechanics of C–S–H. Our simulations offer a good agreement with nanoindentation data over a large range of packing density values. We show that, at constant packing density, stiffness and hardness are not affected by the polydispersity in grain sizes. In contrast, the level of disorder is found to play a critical role. We demonstrate that, in contrast to the case of ordered C–S–H models, the elastic response of disordered C–S–H gels is governed by the existence of stress heterogeneity and nanoyielding within its structure. These results highlight the intrinsically disordered nature of C–S–H and the crucial role of order and disorder in controlling gels’ mechanical properties.