dnf --releasever=27 install gcc-7.3.1-6.fc27

The binutils package is basically the same version in fc27 and fc28 so you may not need to downgrade that.