Answer:
According to www.loc.gov,
"In 1862, Congress passed the Pacific Railway Act, which authorized the construction of a transcontinental railroad. The first such railroad was completed on May 10, 1869."
I hope this helps you out!