That is sometimes a pain. First, lay out the hills as if there were no track going through, make it as realistic as you can. Next, lay the track. It will look like hell, I know. Use the "Smooth Spline" option in the Advanced Track flyout. This works perfectly, but remember that it tends to make it fairly steep. The "Add Gradient" works, but it's tough since it raises only the track, not the terrain, so you have to bring the terrain up to match the track or else it looks like it's flying.