The dynamic analysis of railway vehicles requires an accurate representation of the vehicle, the track geometry and structure, and their interaction. Generally, flexible tracks models with curved geometries represent the rails with straight beam elements, which results in a piecewise linear representation of the rails. As a result, the wheel-rail contact mechanics are not properly captured, and the wheel-rail contact forces present spurious high-frequency oscillations. This work proposes a novel approach to model flexible railway tracks with arbitrary geometries, in which the correct geometry in the wheel-rail contact mechanics is assured by modeling the rails as Timoshenko curved beam elements. This approach improves both the geometric representation of the rails and the accuracy of the wheel-rail contact forces calculation. A realistic operation scenario in which a multibody model of a railway vehicle runs on a flexible track with a curved geometry is used here to present the novel aspects of this work and discuss the improvements over the conventional approaches. The results show that the proposed methodology greatly improves the computation of the wheel-rail forces and prevents spurious oscillations from propagating to the vehicle.