Einstein established two rules: (1) the laws of physics must have the same form in all frames of reference, inertial or non-inertial, and (2) the effects of acceleration are locally completely indistinguishable from the effects of gravity.
Consequences: light is affected by gravity, processes run slower if they experience more gravitational acceleration, light leaving a massive body loses KE so its frequency decreases, etc.

Einstein found that the simplest way to include all effects is to replace gravity by space-time curvature. Thus gravity is reduced to geometry. Objects follow a geodesic (shortest possible) path in curved space-time.