Yes, railroads and industry in the North were important. That and the British Empire didn't invade the US from Canada, as they were tempted to do.
The North barely won. Like Churchill later said about US foreign policy ... we try everything possible that doesn't work, first. The North did that also. Churchill admired Lee, hated Grant. I still like Grant, over McClellan. Grant understood war isn't chess, it is a bar room brawl.