Gilgamesh appears in majority of FF titles. In the series, he is actually the same person, travelling through portals to different worlds. His main objective revolves around the collection of swords.
In FFXII, what I find hilarious about him is that he uses fake versions of famous weapons, some of which are from different FF titles. None of them looks exactly like the original.
From top to bottom: Buster Sword (with the kanji for “fake” written on it and with four materia slots), Revolver (with a Chocobo instead of Griever), Orichalcon, Brotherhood, Zantetsuken and two copies of Tournesol.
Gilgamesh is inspired by the titular character in the ancient Mesopotamian Epic of Gilgamesh. It is considered the earliest surviving great work of literature. It was written on stone tablets:
Info and picture source: https://finalfantasy.fandom.com/wiki/Gilgamesh_(Final_Fantasy_XII)
https://finalfantasy.fandom.com/wiki/Gilgamesh_(character)
https://en.wikipedia.org/wiki/Epic_of_Gilgamesh
I always enjoyed it when this epic poem was brought up in class. I was able to remember most of the names (including Humbaba, a behemoth-like enemy fought in FFX-2) and the story pretty well because of, well, you know...Final Fantasy :D I think the poem meant something more to me than the other classmates. Indeed, you CAN learn a lot from video games :)