You are looking for The Dollmaker by Harriette Simpson Arnow.
The story is set in the 1920s
"First published in 1954, the novel earned a 1955 nomination for the National Book Award."
concerns the difficulties of rural Appalachians trying to adapt to life as factory workers in the urban slums of Chicago
"In a 1983 interview, Arnow said she got to know many back hills women while teaching in a one-room Kentucky school. Later, Arnow moved to a housing project in Detroit. This was during the Appalachian migration, which saw huge numbers of mountain people moving north to work in war-related, automobile manufacturing, and other industries."
It is Detroit though, not Chicago:
"Clovis goes instead to Detroit to do war work in the factories."
The protagonist's name is Gertie
depicts as fully at home and competent in her rural environment
"She is very much at home and fulfilled in this environment, surrounded by nature and connected with the people she loves. She is extremely competent in this mountain life."
then recounts her downward path to ruin in the alien environment of industrial Chicago
"When they arrive in Detroit, however, they find that life is in many ways worse for them. The wartime housing project apartment is small and the neighborhood industrial. The schools are bad, and the winter is hard, the food poor. Money is short and the family must often borrow to buy necessities. There is not always enough food to feed the family."
On the way her 3 year old child is mislaid and run over by a train.
"her beloved daughter Cassie, a sensitive child who simply cannot adapt to the new life, is killed by a train in an accident indirectly caused by Gertie's well-meaning but misguided efforts to try to help Cassie fit in."
All quotes from Wikipedia