Railroads were a chief focus of complaint by farmers in the late nineteenth century. One of the first famers's cooperative groups formed after the Civil War, called The Grange or Patrons of Husbandry, was founded specifically to address farmers's problems with the railroads.
In a nutshell, farmers were upset with the high charges the railroads imposed on them to ship farm goods to market. They argued that since a single railroad often had a monopoly over certain lines, the lack of competition lead to price gouging. As the farmers had no choice but to ship their products using the railway that might be available, the railroad company could charge whatever it wanted. (Today, we have similar fears over our equivalent of railway lines—the internet—and the outsized power of companies like Google and Amazon to set high prices for access.) This price gouging, the farmers said, was unfair. They petitioned for the government to nationalize (take over and run) the railroads and charge fair prices.
The complaints of the organized farm societies against the railroads had a lasting impact on the United States. Rather than socialize the railroads, the government regulated private capital. In 1887, for instance, Congress passed the landmark Interstate Commerce Act, which took regulatory power from the railways out of the hands of states and put the federal government in charge of regulating long distance rail shipping. Another significant piece of legislation was the Sherman Antitrust Act of 1890, which ended the legal right of a business to operate as a monopoly and led to the breakup of existing monopolies. The antitrust act also forbade companies to collude or work together to fix prices.