The railway section reopened on Friday 1 November after Network Rail engineers worked around the clock for five days to replace the track and improve drainage.
The work was carried out to ensure that the railway and journeys through the area remain safe and reliable.
During the closure, Network Rail engineers replaced 64 sleepers, improved track drainage and upgraded level crossing equipment including barriers, lighting and cables at Cradley Heath.
More than 250 tons of ballast, the stones between the track and the sleepers, were used in a two-mile stretch of track.
Special trains called “tampers” then run over the track to vibrate the stones and pack them tightly together, providing a firm foundation for the railway track and sleepers to sit on.
Adam Checkley, director of infrastructure for Network Rail, said: “I would like to thank passengers for their patience while we complete major maintenance work on the section of track between Langley Green and Stourbridge.
“This was important work, carefully planned to cause the least disruption, which will help make journeys smoother and more reliable for years to come.”
Jonny Wiseman, West Midlands Railway’s director of customer services, said: “We are grateful for our passengers’ patience while Network Rail completed these major engineering works over the past week.
“We are pleased that the line has now reopened as planned and our normal timetable is running again.”
Michael Stewart, commercial and customer strategy director at Chiltern Railways, added: “Network Rail’s engineering work will help keep the railways safe and ensure journeys are more reliable in the future.
“I would like to thank customers for their understanding as the upgrades have now been completed and the line has reopened.”