I know what a fianchetto is, developing a bishop on the 2nd/7th ranks on the long diagonals. But how did the word 'fianchetto' come into play as a chess term?
This is what a dictionary like Merriam Webster says:
from Italian, diminutive of fianco side, flank, from Old French flanc — more at flank
That's what it means and what its origin is; as for how it became a chess term, the most logical explanation is that Italian players started or at least popularized this. The 1847 book Chess Preceptor: A New Analysis of the Openings of Games by Carl Friedrich Jaenisch seems to confirm this:
We must observe; en passant, that the Italians in general designate by the term "fianchetto" a game in which one or both players, instead of opening with their centre pawns, first move the pawns on their wings. To play the "fianchetto" (the "flank," or "wing" opening) of the king, would be then to commence by the King's wing pawns; and so of the Queen and her "fianchetto." However, the "fianchetto" of the King only extends, properly speaking, to beginning with K B P, and the "fianchetto" of the Queen to commencing with Q B P. This latter falls into a regular French opening, while the King's "fianchetto" classes as an irregular.
As, however, the term "fianchetto" is exclusively used in Italy, we shall, to avoid confusion, only apply it here to games begun by the Knights' Pawns moved one square, to place Bishops on Knights' second squares. You may, indeed, try to advance, from the very beginning of the game, the Rooks' Pawns two squares, and more, to attempt getting Rooks instantly into play. But these débuts are disadvantageous, since the premature sortie of the Rooks loses precious time, while it confuses their own game, and weakens the wings.