English has two words for spying that are really the same word, borrowed twice. The short one arrived in the Middle Ages. The long one came in at the end of the 18th century.
The short one is spy. Etymonline dates it to the mid-1200s, when English spien meant "to watch stealthily." It came from Old French espiier, probably from a Germanic source such as Frankish spehon. The noun followed at about the same time, for someone who keeps watch or makes secret observations. Espy, "to catch sight of," came from the same French verb even earlier, in the early 1200s.
The long word took a detour through Italy. Etymonline traces espionage to French espionnage, "spying," from espionner, "to spy," and espion, "a spy," recorded in the 16th century. That French noun probably came from Old Italian spione. And spione most likely came from the same Germanic word for spying that had already given French espiier.
So the Germanic root went into French once in the Middle Ages and gave English spy. Then it went into Italian, came back into French, and reached English again as espionage. Etymonline dates the English word to 1793. Dictionary.com gives a first-recorded window of 1785 to 1795.
The -age ending is the same one found in other French borrowings, turning an action into a general practice. Spying is what one person does. Espionage, in Dictionary.com's definitions, is the organized use of spies by a government or a company to get rivals' secrets.
That more official, systematic flavor stuck. When the United States enacted a wartime law on June 15, 1917, two months after entering the First World War, it was called the Espionage Act. Much of the law is still in force today.
The Germanic root is itself a survivor. Etymonline describes the Germanic spying words as remnants of an Indo-European root, spek-, "to observe." Middle English even had a word for a woman in the trade: espiouress, "female spy," recorded in the early 1400s and since lost.