The firm beat four other civil engineering contractors chasing the complex phased project to replace the 1860s wooden piled crossing near Penrhyndeudraeth.
Network Rail and Gwynedd Council said the new crossing, which spans the River Dwyryd, would improve the economy of the area, and overcome the need for an 8-mile detour.
The deal is another coup for the UK arm of German contractor Hochtief, which is building a reputation in the UK for taking on challenging bridge and viaduct jobs.
The work will involve detailed design and construction of a new rail bridge next to the existing structure. Hochtief will then demolish the old rail bridge and a new two-lane road bridge that links to the railway viaduct to create a single bridge structure.
Road approaches to the new bridge are to be improved to allow two-way traffic, and a 2.5m wide footway/cycleway.
Hochtief will commit to taking on local apprentices and maximising supply chain opportunities for local firms.
Work on the new bridge is due to start next month and take two years to complete.