In recent years, there has been an intense interest in understanding the microscopic mechanism of thermally induced magnetization switching driven by a femtosecond laser pulse. Most of the effort has been dedicated to periodic crystalline structures while the amorphous counterparts have been less studied. By using a multiscale approach, i.e. first-principles density functional theory combined with atomistic spin dynamics, we report here on the very intricate structural and magnetic nature of amorphous Gd-Fe alloys for a wide range of Gd and Fe atomic concentrations at the nanoscale level. Both structural and dynamical properties of Gd-Fe alloys reported in this work are in good agreement with previous experiments. We calculated the dynamic behavior of homogeneous and inhomogeneous amorphous Gd-Fe alloys and their response under the influence of a femtosecond laser pulse. In the homogeneous sample, the Fe sublattice switches its magnetization before the Gd one. However, the temporal sequence of the switching of the two sublattices is reversed in the inhomogeneous sample. We propose a possible explanation based on a mechanism driven by a combination of the Dzyaloshiskii-Moriya interaction and exchange frustration, modeled by an antiferromagnetic second-neighbour exchange interaction between Gd atoms in the Gd-rich region. We also report on the influence of laser fluence and damping effects in the all-thermal switching.