In all of these ‘gn’ words the ‘g’ is silent—not pronounced. They all came into English from French fairly early and have been thoroughly ‘naturalized’.
Words with ‘gn’ which came into English directly from Latin, such pugnacious, preserve the /g/ sound. But some of these have French-mediated cognates without the /g/—impugn is one such. Signature, although it came into English from French in the 14th century, was at some point reinterpreted as if it came directly from Latin signatus, and is pronounced with the /g/. Your magnolia is even more curious—it derives from the name of the French botanist Magnol, but by way of the Latinized botanical name of the plant (which was conferred upon it by an English admirer), so it pronounces the /g/.
There are some ‘gn’ words from Greek; these preserve the /g/ when it follows a vowel (agnostic, anagnorosis), but not at the beginning of a word (gnostic, gnome).
There are many more recent words from both French and Italian which are so to speak ‘permanently resident aliens’; these retain their native pronunciations (more or less—you might not be very happy with our pronunciation of terms from your own language) with /nj/: cognac, lasagne, carmagnole, bagnio and gnocchi.
Finally there are the words starting with ‘gn’ which descended from Old English. These all retained the /g/ into Middle English down to the period when spelling began to be regularized, but subsequently lost it. ‘gn’ inside OE words lost the /g/ sound much earlier, which is why the letter ‘g’ no longer appears in (for example) rain < OE regn.
And Jim reminds us of gnu. Dictionaries license both /nu:/ and /nju:/; the word is variously said to derive via Dutch gnoe from Khoikoi gnou or Khoikhoi i-ngu repesenting Southern Bushman !nu:.