The ñ does not exist in Latin and is the only Spanish letter of Spanish origins.
Beginning in about the 12th century, Spanish scribes, whose job was to copy documents, used the tilde placed over letters to indicate that a letter was doubled (so that nn became ñ and aa became ã). The shape of the tilde isn’t a coincidence - it was originally a small letter n.
The reason was to save space in manuscripts because parchment was expensive.
The popularity of the tilde for other letters eventually waned, and by the 14th century, the ñ was the only place it was used.
As the phonetic nature of Spanish became fixed, the ñ came to be used for its sound, not just for words with a double n.
A number of Spanish words, such as señal and campaña, that are derived from the same roots as English words, use the ñ where English uses "gn," such as in "signal" and "campaign," respectively. So you could say that the English gn is the same as the Spanish ñ.
So now you know - go forth and impress your friends!