Yup, there used to be an old ad campaign--"If you have it, a truck brought it." And it's true--although with modern supply chains today we probably should also throw in ships, trains, and airplanes.
Transportation costs are embedded in the cost of every physical good.
Trains are much less sensitive to fuel prices than trucks are.
The capital investment necessary to make trains work at all is really big. But after that the marginal cost of an additional car is very low. In terms of energy efficiency, trains are much better than trucks. What they lack is convenience, at least right now.
In terms of cost, trucks often win because the trucking company doesn't bear the burden of building/maintaining the highway system. Yes they pay fuel taxes, but trucks make basically all the wear on roads. Wear seems to be based on the fourth power of weight. Check this: http://facweb.knowlton.ohio-state.edu/pviton/courses2/crp776...
This is a common theme for basically everything having to do with energy efficiency. You can have low up-front cost and larger ongoing costs, or larger up-front costs and lower ongoing costs. In the case of trains the ongoing costs are similar at current fuel prices but once they double again you'll see more train cargo and less truck cargo.
The problem with trains is that the capital investment and up-front work that is needed becomes a political issue[1]. How do you decide on the route of a new train line? Who pays for the line to be built?
Building railway infrastructure was simpler when there was a lot of open country to build long straight lines through, but building a new line today is much harder with compulsory purchase of land and groups lobbying against it. The process takes a long time too, so elected officials won't see the benefits of backing it at the next election.
I think it is unlikely that US freight will move from road to rail without a significant amount of political and financial pressure.
Transportation costs are embedded in the cost of every physical good.