How does one simulate continuous gravity using a discrete timestep?
This is an example of Euler's Method

Using differentiation, you can find a better formula. Since discrete calculations only "drift" if they are non-linear, you only need to alter the position/time calculation.

// Repeat once per frame
position += velocity * deltaTime + gravity * Math.pow(deltaTime, 2.0) / 2.0;
velocity += gravity * deltaTime;


Even large timesteps align perfectly with the continuous graph: