Smile comes from Middle English smilen, borrowed from Old Norse smíla or Middle Low German smilen, both meaning “smile”, from Proto-Germanic *smīlijaną “to smile”, ultimately from the Proto-Indo-European *smey- “to laugh”, “to be glad”, with an extension *-l.
Another derivative *smey-rós became Proto-Italic *smeirus, and Latin mīrus, with regular loss of *s before sonorants (liquids and nasals) and regular change of /ei/ to /iː/. Mīrus meant “amazing”, “marvelous”, “wonderful”, “surprising”, etc. A verb form mīror “I am astonished at”, “I marvel at”, “I am amazed at”. With the suffix -ābilis, forming adjectives meaning “able to” or “worthy of being Xed”, the word mīrābilis meaning “amazing”, etc., was formed. A neuter plural mīrābilia was reinterpreted as a feminine singular in Vulgar Latin, producing the Old French merveille, which was borrowed into Middle English as marvail, and thence Modern English marvel.
Another Latin derivative of the verb mīror was mīraculum, the source of miracle.
The verb mīror became Old French mirer “to look at”, from which the noun mireor was formed, which produced Modern English mirror.