There are three lines between HWH & MGS.
1.> The oldest and slowest line is now known as the 'Sahebganj Loop'. It was the original 'Main line'. It went this way HWH-BDC-BWN-BHP-RPH-SBG-BGP-JMP-KIUL-PNBE-MGS. This route was the first conceived by the britishers because of the ease of construction. The entire route is built on the flat gangetic plain, which meant construction of the lines were much easier in 1840s-1850s when technology available to the 'Brits' was limited. At present this route is un-electrified and The Upper India Express still goes via this route.
2.>...
more... However the Brits sooner realized that a much shorter route could be constructed going via RNG-ASN, which was rich in coal. Durgapur didn't exist back than and Asansol was a tiny hamlet. Back in those days, there was a very limited use of petroleum, and coal was literally 'energy'. Though the route was a bit more challenging, the rewarding prospect of transportation of Coal, as well the route being much shorter meant that by 1860s the Brits were working on this route. The line was to join the original 'Main line' at Kiul, a major enginering challenge was construction of the railway bridge between Lakhisarai and Kiul. This much shorter line was now known as the 'Main line' while the earlier line became the 'Sahebganj Loop'. The line followed
HWH-BDC-BWN-RNG-ASN-JSME-JAJ-KIUL-PNBE-MGS.
2a> GAYA was a very important pilgrimage center. There were persistent demands of linking up GAYA with the railways. The British therefore linked up GAYA to PNBE via a narrow guage line then known as 'South Bihar Railways'.
2b> The Brits soon found out an even larger and higher quality of coal in the small kingdom of Jharia. Coincidentally the british constructed a line between Sitarampur and a small village known as Dhanbad and later extending that line to Jharia. The Brits thought of devloping Dhanbad more because of it's location and availability of large spaces. They constructed a loco tank and steam loco shed for housing locomotives. In a matter of time Dhanbad station devloped much faster than Jharia did.
2c> The Brits had also managed to construct a 'chord line' between HWH-BWN reducing the distance by 10kms. However the real advantage was the lack of populated areas on route, which meant significantly shorter travel times.
3.> It didn't take the Brits long enough to join all the dots and figure out that joining ASN-DHN-GAY-MGS would shorten their travel distances by around 80kms. Furthermore ASN/DHN provided coal while GAYA fetched a lot of Indian passengers. The idea of the Grand Chord was born!
Why it got named as 'The Grand Chord' that I do not know of. My Late Grandfather who used to be a Guard in ER's DHN Division from 1960s to 1990s never told me that.
Anyhow the 'GC' was an engineering marvel in those days and the Brit (East Indian Railways) s had to face a lot of engineering challenges which they never encountered before. It took the longest amount to amount to complete and was ready by 1903.
Some of the challenges faced by the East Indian Railways :-
1. The uneven terrain between ASN-DHN-GMO which had to be cut and relatively flattened for laying the railway tracks.
2. The sudden conclusion of the Chota Nagpur Plateau between Gajhandi and Gurpha. The solution was to cut tunnels through mountains which was a huge job back in the day.
3. The Dehri-on-Sonne bridge spanning a huge length. It was a major challenge back then.
After the completion of the GC the HWH-MGS line became around 90kms shorter as HWH-BWN-ASN-DHN-GAYA-MGS.
After completion of the 'GC' the lines were named as:-
1. HWH-BWN-SBG-BGP-KIUL-PNBE-MGS as Sahebganj Loop
2. HWH-BWN-ASN-JAJ-KIUL-PNBE-MGS as Main line.
3. HWH-BWN-ASN-DHN-GAYA-MGS as The Grand Chord.
Hope this helps :P