|North Portland Railroad Map|
For one thing, the land slopes gently down toward the north and east, so by the time Lombard meets up with the railroad (a couple miles east of the above map), their elevation is about 50 feet, only about 25 feet higher than Swan Island. The railroad has about 5 miles to to make that climb, which is only about one foot of rise in a thousand feet of run, which should be easy enough for any train.
So that part of the puzzle is filled in. But while I am looking into this I discover a train tunnel running under North Portland. I had no idea. The tunnel was built a hundred years ago and is still in daily use. It is the pale orange line running vertically in the map above, about a half an inch from the right hand border. The railroads first project to cut across North Portland involved making a cut (basically a big ditch). That's the thick orange line running diagonally across the map. People were so upset about their town being cut in half by this ditch that when the railroad proposed making another cut, they were forced to back off and dig a tunnel instead.
Brief history of the tunnel here.
Discussion on Reddit here.
Railroad maps here.
Topographic maps here.