Make sure your track ends just inside the edge of a square, and the smooth spline tool won't leave as big a gap. Alternatively (and more realistically) use an abutment track object. Worst case, build a retaining wall.
If you use the 5m grid the gap will be smaller but still not fill the gap. Use the same brickwork as the rest of the bridge to extend it that little bit further and bury it in the bank.
Use "smooth spline" under the ground track, then move the spline point (the one that connects the track to the bridge end) toward the ground until the gap is filled.