The result is not true without additional assumptions. See A counterexample to the periodic orbit conjecture by Sullivan.
Added later. The paper by Sullivan linked above exhibits a foliation by circles on a compact manifold of dimension $5$ with non-Hausdorff leaf-space. Later, Epstein and Vogt constructed a foliation by circles on a compact manifold of dimension $4$ with the same property, see A Counterexample to the Periodic Orbit Conjecture in Codimension 3.
The problem makes sense for foliations of arbitrary dimensions. No need to be restricted to foliation by curves. There are also examples of holomorphic foliations having all its leaves compact but with non-Hausdorff leaf-space, on non-compact complex manifolds, see On the stability of holomorphic foliations by Holmann.
As far as I know, there are no examples in the literature of holomorphic foliations with all its leaves compact and with non-Hausdorff leaf-space on a compact complex manifold.