Railways totalling 27 miles (43 km) were completed before the docks opened to connect them to the coal fields.
At peak, there were 88 miles (142 km) of running tracks and 108 miles (174 km) of single-track sidings, over 1,000 yards (910 m) of viaducts and 2,500 yards (2,300 m) of tunnels, with seventeen stations.
The lines had gentle gradients, no more than 1 in 400 against the load on the main line.

The main Barry railway from the docks to the coalfields joined the Rhondda Fawr line of the Taff Vale Railway near Hafod north-west of Pontypridd.
There were branch lines that joined the Taff Vale line at Treforest and the Great Western Railway at Peterston-super-Ely and St Fagans.

A branch line mainly used for passenger traffic connected Barry to the Taff Vale Railway at Cogan Junction near the Penarth dock station.

The railway had two long tunnels and four huge viaducts of steel and masonry.

The viaducts at Llanbradach, Penyrheol, Penrhos and Walnut Tree on the line from Tynycaeau Junction to Barry Junction (B&M)on the former Newport & Brecon Railway have all been demolished.

The Porthkerry Viaduct was built for the Vale of Glamorgan Railway (VoGR), and still stands.

The stone structure has sixteen arches and is 110 feet (34 m) at the highest point.
After some construction difficulties it opened in 1900.

The VoGR was a branch line connecting the Barry Railway with the Great Western Railway at Bridgend  but its main line ran to Coity Junction on the Bridgend-Maesteg line.
That branch also incorporated a long and a short tunnel, Porthkerry No.1 and Porthkerry No.2.

A link from Tynycaeau Junction on the Cadoxton-Pontypridd main line, to join the Brecon and Merthyr Railway at Dyffryn Isaf (Barry Junction) in the eastern Rhymney Valley was authorised in 1898, and opened in 1905, by which time the railway had been extended to 47 miles (76 km) of route.

The dock layout that was originally planned was adjusted as the work progressed to ensure that the foundations rested on hard rock.

The basin entrance and passage were sited so that their foundations rested on hard rock.
After the tide had been excluded, pits and borings were made to determine the nature of the bottom.
A much narrower dock had been planned, but it was decided to move the south wall further south.
A mole was added running along the middle of the dock, which increased the length of the quays.

Thirty locomotives were used inside the dock works to carry materials.
At peak there were 3,000 workers on the construction site.

In the summer and autumn the work continued day and night, with the site lit by electricity and Wells lights.
Railways totalling 27 miles (43 km) were completed before the docks opened to connect them to the coal fields. At peak, there were 88 miles (142 km) of running tracks and 108 miles (174 km) of single-track sidings, over 1,000 yards (910 m) of viaducts and 2,500 yards (2,300 m) of tunnels, with seventeen stations. The lines had gentle gradients, no more than 1 in 400 against the load on the main line.
The main Barry railway from the docks to the coalfields joined the Rhondda Fawr line of the Taff Vale Railway near Hafod north-west of Pontypridd. There were branch lines that joined the Taff Vale line at Treforest and the Great Western Railway at Peterston-super-Ely and St Fagans. 
A branch line mainly used for passenger traffic connected Barry to the Taff Vale Railway at Cogan Junction near the Penarth dock station.
The railway had two long tunnels and four huge viaducts of steel and masonry. 
The viaducts at Llanbradach, Penyrheol, Penrhos and Walnut Tree on the line from Tynycaeau Junction to Barry Junction (B&M)on the former Newport & Brecon Railway have all been demolished.
The Porthkerry Viaduct was built for the Vale of Glamorgan Railway (VoGR), and still stands.
The stone structure has sixteen arches and is 110 feet (34 m) at the highest point. After some construction difficulties it opened in 1900.
The VoGR was a branch line connecting the Barry Railway with the Great Western Railway at Bridgend  but its main line ran to Coity Junction on the Bridgend-Maesteg line. That branch also incorporated a long and a short tunnel, Porthkerry No.1 and Porthkerry No.2.
A link from Tynycaeau Junction on the Cadoxton-Pontypridd main line, to join the Brecon and Merthyr Railway at Dyffryn Isaf (Barry Junction) in the eastern Rhymney Valley was authorised in 1898, and opened in 1905, by which time the railway had been extended to 47 miles (76 km) of route.
The dock layout that was originally planned was adjusted as the work progressed to ensure that the foundations rested on hard rock.
The basin entrance and passage were sited so that their foundations rested on hard rock. After the tide had been excluded, pits and borings were made to determine the nature of the bottom. A much narrower dock had been planned, but it was decided to move the south wall further south. A mole was added running along the middle of the dock, which increased the length of the quays.
Thirty locomotives were used inside the dock works to carry materials. At peak there were 3,000 workers on the construction site.
In the summer and autumn the work continued day and night, with the site lit by electricity and Wells lights.
Barry Docks