Is the railroad responsible for injuries to an employee caused by a trespasser?

It depends on the circumstances.

Under the Federal Employers' Liability Act, or FELA, a railroad is only responsible for the conduct of the people who are working for it. Since trespassers are not performing any activities for the rail operator, a railroad is typically not responsible for their conduct.

The exception to this rule is that a railroad has a duty to protect its employees from hazards it knows exist or should know about. If a railroad knows, or should know, that a particular area is subject to trespassing on a regular basis and that trespassers commit acts of damage to property or injury to employees, that may put the railroad on notice of a hazard it should protect employees from in the exercise of reasonable care.

This is really just a common-sense application of applicable laws. If a trespasser causes only minor property damage in a one-time incident, a court my not feel that isolated incident is enough to put the railroad on notice of any potential hazards to its employees at that job site.

On the other hand, if an area sees crimes committed against rail workers or property on a regular basis and the railroad takes no steps to increase the protection of its employees in that area, a court may find that the rail owner should have known of the hazards posed to its employees in that area based on the pattern of past conduct and the failure of the railroad to take any steps to protect its employees was negligent. Under those circumstances the railroad would be responsible for injuries caused by trespassers.