First of all a DEM often results in a rollercoaster of rediculous grades: 0.10% down, then 4.75% up.
A gradient should never be more than 1.75% at the most 2.00% (unless your modeling Saluda grade).
Most gradients are 0.10% to 0.50%, and sometimes go to 1.00% and 1.50%.
I first lay my track looking straight down from above, and get the straights and curves correct.
A curve is always preceeded, and postceeded by a straight trackage (is that a wurd) ?
Then I almost sink every track spline point, almost into the ground ... as trees, and schwubbery may have thrown off the actual ground terrain height by +10m to +20m.
My gradients go from 0.00%, to 0.15%, to 0.30%,, to 0.60%, to 1.00%, to 1.25%, to 1.50%, to 1.75% ... then down again progressively in these steps.
Never do I go directly from 0.00% to 0.50% ... I always add a middle grade percentage in between, such as 0.25%.