Many different rail lines were built in the western United States from the 1850s onwards. Was construction ever delayed/canceled due to difficulty in finding workers, or due to workers leaving the job?
I was surprised to find out that, yes there were troubles with labor shortages. From Public Broadcasting Station "American Experience" article on the "Workers of the Central Pacific Railroad",
I'd recommend either purchasing the DVD the series has on the transcontinental railroad, finding it at your local library, or at least reading the article. I imagine that given your interest in the subject you would really appreciate it.
There were absolutely labor crunches while building the transcontinental railroads--these roads were stretching across a vast, unpopulated (by European Americans, that is) and harsh terrain. Labor shortages were worst during the Civil War, for obvious reasons. However, I can't find evidence of any major delays in the railroads' construction. This is due in part to governmental support to the railroads, but I believe it is mainly attributable to the unique vulnerability of the Chinese laborers.
Irish immigrants were the other major labor pool available to the railroads, but they proved to be more "rambunctious" than the Chinese. Speaking English and facing less ethnic hostility than the Chinese (though still facing considerable hostility), they had better alternative employment opportunities. Furthermore, they looked more like your average American, and so could escape their labor contracts and blend into the surrounding population. Thus in the classic formulation of Exit, Voice, and Loyalty, Irish laborers had "exit" open to them.
But the Chinese were structurally more predisposed to choose "loyalty" to the railroad company than were other ethnic groups. "Exit" could result in imprisonment or worse:
"Exit" was even less attractive when construction teams were working in wildernesses miles away from Chinese communities. Such distance and isolation made "voice" a poor option as well. Chinese laborers on the Central Pacific maintained a strike for about a week, but it was destined to fail. Remember, construction crews were like moving cities, and so all food and supplies was delivered to these crews along the single track stretching back to its point of origin. In other words, the railroad company controlled the food supply.
When the Civil War ended, the bargaining position of the Chinese became even weaker. The Central Pacific considered applying to the Freedman's Bureau in order to employ former slaves on the construction crews. As one Central associate noted, "A Negro labor force would tend to keep the Chinese steady, as the Chinese have kept the Irishmen quiet" (Brands, 60-61).
In short, neither exit nor voice were attractive options for Chinese railroad workers. By default, "loyalty" ensured the timely construction of the transcontinentals. American Indians were more threatening than labor problems: Sioux and Cheyenne warriors made regular raids against the Union Pacific in spring 1867, destroying equipment and sometimes killing workers. As one railroad man wrote to Ulysses S. Grant at the war department: "We've got to clean the damn Indians out or give up building the Union Pacific Railroad" (Brands, 65).
Krauss (High Road to Promontory) notes that the Central Pacific had trouble keeping workers. Here's why: the railroad was being built through the mining regions of California (which was perfectly natural as the CP hoped to profit from shipping the ore). The CP would transport the workers from San Francisco up to the worksites. After a week of work, the workers would leave to stake a claim in gold country. The workers used the CP for free transportation inland, and there was precious little the CP could do about it.
The Union Pacific faced different labor challenges. Untrained workers were relatively easy, but it was difficult to find trained workers willing to chance getting killed by Indians (hundreds were killed this way). For example, twice the UP's chief surveying team was ambushed and wiped out by Indians. Why would a surveyor or engineer work on the UP when he could just as easily find work on an Eastern railroad where he wouldn't get shot at?
When working through Utah, both railroads hired Mormons to supplement their workforces. Interestingly, it is claimed by Bain (Empire Express) that the Central Pacific paid the Mormons 40% more than the Union Pacific paid them. The Mormons were actually grading two parallel roads for 200 miles - one for the UP and one for the CP. Large sections ended up being abandoned because there was no need for 2 railroads in a desert where few people lived.