I would assume it was tied to the rise of the automobile, but why this particular form of recreation? How did it evolve from simple carnivals which traveled around via rail, to a fixed location that people came to visit? What gave rise to the pairing of carnival games and food stands with massive roller coasters and themed characters from movies and cartoons?
No, they are clearly older than the automobile, I was in the Tivoli in Copenhagen, which was opened in 1843. It is basically in the city center, right accross from the Central Station. European cities used to have all sorts of large parks and gardens and pleasure gardens and recreational forests since long ago, and they often hosted fairgrounds with merry-go-rounds and whatnot, making them permanent and offering more of a selection is not a huge change. Think Central Park with merry-go-rounds.
I love the part that the argument presented to the Danish king for allowing the Tivoli to be built was "when the people are amusing themselves, they do not think about politics". Well, that is an idea much, much older than cars.