Answer by taking a quote from the following article:

Maurice Robert "Mike" Gravel (; born May 13, 1930) is an American politician who was a Democratic United States Senator from Alaska from 1969 to 1981 and a candidate in the 2008 U.S. presidential election. Born and raised in Springfield, Massachusetts, by French-Canadian immigrant parents, Gravel served in the U.S. Army in West Germany, and he later graduated from the Columbia University School of General Studies. He moved to Alaska in the late 1950s, becoming a real estate developer and entering politics. He served in the Alaska House of Representatives from 1963 to 1966 and also became Speaker of the Alaska House.

Gravel "decided to become a pioneer in a faraway place," and moved to pre-statehood Alaska in August 1956, without funds or a job, looking for a place where someone without social or political connections could be a viable candidate for public office. Alaska's voting age of 19, less than most other states' 21, played a role in his decision, as did its newness and cooler climate. Broke when he arrived, he immediately found work in real estate sales until winter arrived. Gravel then was employed as a brakeman for the Alaska Railroad, working the snow-clearing train on the Anchorage-Fairbanks run. Subsequently, he opened a small real estate brokerage in Anchorage (the Territory of Alaska not requiring a license) and saved enough so as not to have to work the railroad again. Gravel joined the Anchorage Unitarian Universalist Fellowship, and continued a sporadic relationship with the movement throughout his life.  Gravel married Rita Jeannette Martin, who had been Anchorage's "Miss Fur Rendezvous" of 1958, on April 29, 1959. They had two children, Martin Anthony Gravel and Lynne Denise Gravel, born c. 1960 and 1962 respectively.  Meanwhile, he went to Washington, D.C. in 1957 to campaign for Alaskan statehood via the "Tennessee Plan": dressed as Paul Revere, he rode with a petition to the steps of the U.S. Capitol. Seeing Alaska as a wide-open place with no political establishment or entrenched interests, and using the slogan "Gravel, the Roadbed to Prosperity", he ran for the territorial legislature in 1958 but lost. He went on a national speaking tour concerning tax reform in 1959, sponsored by the Jaycees. He ran without avail for the City Council in Anchorage in 1960. During this time, he had become a successful real estate agent; after the 1960 election, he became a property developer in a mobile home park on the outskirts of Anchorage. A partner ran into financial difficulty, however, and the project went into Chapter 11 bankruptcy and Gravel was forced out in 1962.

When did he stop working the railroad?
Gravel married Rita Jeannette Martin, who had been Anchorage's "Miss Fur Rendezvous" of 1958, on April 29, 1959.