Gimli is the son of Glóin, one of the former companions of Bilbo Baggins. He is a remote descendant of Durin the Deathless, father of the Dwarven people Gimli belongs to. Third cousin once removed to Dain II 'Ironfoot' (king of Durin's Folk), Gimli is of the royal line, but not close to the succession. (Gimli is also the first cousin once removed of Balin, also one of Bilbo's former companions.) Gimli is introduced at the council of Elrond, which he attends together with his father to bring news of his home, Erebor. Gimli is chosen by Elrond as one of Frodo's companions.
Within the Fellowship, Gimli initially clashes with Legolas, because of various reasons: Elves and Dwarves are still feuding over the ancient destruction of Doriath, and more recently Thranduil, Legolas' father, once imprisoned Gimli's father Glóin (as described in The Hobbit). Despite this, Gimli and Legolas slowly become friends, as they find mutual respect for each other.
As the Fellowship is forced to enter the desolate mines of Moria Gimli is at first enthusiastic, hoping to find a colony of his people there, led by Balin. This hope turns to naught however, as Moria is found to be infested with Orcs, and the Fellowship has to fight its way out after discovering the tomb of his cousin. After Gandalf the Wizard falls into darkness struggling with a Balrog, the Fellowship finally escapes the mines. It is then that Gimli must enter the forest of Lothlórien, populated by Elves which are not friendly to Dwarves. Gimli is told he alone must be blindfolded if he is to enter the forest, and his refusal nearly leads to a violent situation, which is only defused when Aragorn proposes that the entire Fellowship be blindfolded.
Gimli's opinion of Elves drastically changes when he meets Galadriel, Lady of Lothlórien: her beauty, kindness, and understanding impresses Gimli so much that, when given the opportunity to ask for whatever he wishes, asks not treasures or magical items, but rather one of Galadriel's silver-gold hairs, which he will treasure forever. An interesting historical note is that, according to "The History of Galadriel and Celeborn" in Unfinished Tales, this same request was made, thousands of years previously, by Fëanor, greatest of the Ñoldorin Elves (whose creation of the Silmarils may have been inspired by that same silver-gold hair). Galadriel refused Fëanor's request, but she grants Gimli's, perhaps because of his humility.
Gimli's love and respect for Galadriel is further demonstrated at his first encounter with Éomer of Rohan. Éomer speaks ill of the name Galadriel, having been told false rumours about her. Gimli responds to this with overtly harsh words, leading to a hostile situation that again had to be defused by Aragorn.
By the end of the first volume, he strikes an unlikely friendship with the Elf Legolas. In the second (The Two Towers), Gimli proves his valour in combat in the Battle of the Hornburg, though he is wounded. In that battle, he and Legolas engage in an Orc-slaying contest which results in a stronger bond between the two (Gimli wins by one; he kills 42 to Legolas' 41). Later, Gimli's vivid description of the Glittering Caves of Aglarond moves the Elf to promise to come back and visit when the War is over. (They eventually do fulfil this promise, with Gimli also consenting to visit Fangorn Forest.) Their friendship is a model for overcoming prejudice; they even ride together on the same horse.
After the War, Gimli would lead a large number of Durin's folk south to establish a new Dwarf-realm at Aglarond, and he became the first Lord of the Glittering Caves. The Dwarves of the Glittering Caves, led by their lord, would repair much of the physical damage incurring during the War of the Ring. Most notably, they rebuilt the Great Gate of Minas Tirith with a new one made of mithril and steel, as well as improving upon the existing layout of the entire city.
Gimli was 139 years old (born in 2879 of the Third Age) when the Fellowship of the Ring set out from Rivendell, making him 52 years older than Aragorn. His date of death is not known, and according to the Red Book of Westmarch, some say that after Aragorn died in Fourth Age 120, he travelled with Legolas into the West (perhaps granted permission at the request of Galadriel), the first Dwarf to visit the Undying Lands.
Portrayals in adaptations
Gimli was voiced by David Buck in Ralph Bakshi's 1978 animated version of The Lord of the Rings. Here he is drawn as being almost as tall as the rest of the non-hobbit members of the Fellowship.
In Peter Jackson's movie trilogy (2001–2003) Gimli is played by John Rhys-Davies, who happened to be taller than the actors playing the Hobbits, who were only 5'6" and 5'7" respectively while Rhys-Davies is 6'1". Thus in scenes where Gimli and the Hobbits appear together, their respective sizes remain in proportion, whereas in scenes where they have to interact with human-sized characters, tricks of scale had to be employed, especially since John Rhys-Davies is also taller than Viggo Mortensen and Orlando Bloom (who played Aragorn and Legolas respectively), both of whom are only 5'11".
In the movies, Gimli's rougher personality compared to Aragorn and Legolas is somewhat exaggerated, and he sometimes provides the defusing comic relief, which many readers find distasteful as being untrue and unfair to the character. A cinematic defence to this is Merry and Pippin provide the comic relief initially, but as the saga unfolds the War forces them to mature, so Gimli becomes the sole source of comic relief in order to pace dramatic tension.
Also, Gimli is given a heavy helmet and many axes of different shapes and uses. In the book, he bears only one axe throughout, together with a "short corslet of steel rings". Also, the Gimli of the book wears a hood, following the custom of his folk; he only replaces his hood with a helm (and a green shield) from the armoury of Meduseld before setting off to the Hornburg. This helm is later lost during the battle, where he is wounded in the head; the green shield is not mentioned again.
In Canada, Gimli was portrayed by Ross Williams in the 3-hour Toronto stage production of The Lord of the Rings, which opened in 2006.
In the United States, Gimli was portrayed by Elizabeth Harris in the Cincinnati stage productions of The Fellowship of the Ring (2001), The Two Towers (2002), and The Return of the King (2003) for Clear Stage Cincinnati. At Chicago's Lifeline Theatre, Gimli was played on-stage by Brooks Darrah in The Two Towers (1999).
"Faithless is he that says farewell when the road darkens," said Gimli.
"Maybe," said Elrond, “but let him not vow to walk in the dark, who has not seen the nightfall."
"Yet sworn word may strengthen quaking heart," said Gimli.
"Or break it," said Elrond.
"These are not holes. This is the great realm and city of the Dwarrowdelf. And of old it was not darksome, but full of light and splendour, as is still remembered in our songs."
"Sleep! I feel the need of it. Yet my axe is restless in my hand. Give me a row of orc-necks and room to swing and all weariness will fall from me!"
"Baruk Khazâd! Khazâd ai-mênu!" (Axes of the Dwarves! The Dwarves are upon you!) — Dwarvish battlecry, the only recorded examples of spoken Khuzdul phrase (some Khuzdul phrases occur on Balin's tomb).
"Strange are the ways of Men, Legolas! Here they have one of the marvels of the Northern World, and what do they say of it? Caves, they say! Caves! Holes to fly to in time of war, to store fodder in! My good Legolas, do you know that the caverns of Helm's Deep are vast and beautiful? There would be an endless pilgrimage of Dwarves, merely to gaze at them, if such things were known to be. Aye indeed, they would pay pure gold for a brief glance!"
"And I would give gold to be excused," said Legolas, "and double to be let out, if I strayed in!"
"You have not seen, so I forgive your jest." ... "But you speak like a fool.... when the torches are kindled and men walk on the sandy floors under the echoing domes, ah! then, Legolas, gems and crystals and veins of precious ore glint in the polished walls; and the light glows through folded marbles, shell-like, translucent as the living hands of Queen Galadriel. There are columns of white and saffron and dawn-rose, Legolas, fluted and twisted into dreamlike forms; they spring up from many-coloured floors to meet the glistening pendants of the roof: wings, ropes, curtains fine as frozen clouds; spears, banners, pinnacles of suspended palaces!… Do you cut down groves of blossoming trees in the springtime for firewood? We would tend these glades of flowering stone, not quarry them…"
From Jackson's films
"Nobody tosses a dwarf!" In Moria as Legolas and Aragorn are assisting the Hobbits over the broken bridge.
After asking Aragorn to toss him into a horde of Uruk-hai: "Don't tell the elf."
After Legolas kills an Oliphaunt and its entire crew of Haradrim warriors atop of it: "That still only counts as one!" (in reference to their contest)
"He was twitching... Because he's got MY axe embedded in his nervous system!" (After Legolas shot an orc claiming that it was still moving, so he can tie Gimli's orc slaying count. When Gimli wiggled his axe, the body did indeed twitch).
"I'm wasted on cross-country! We dwarves are natural sprinters! Very dangerous over short distances!" Gimli complaining as the split fellowship chase the Uruk-Hai.
"Certainty of death, small chance of success... What are we waiting for?" Gimli evaluating Aragorn's suggestion to march to the Gates of Mordor.
Gimli: (To Aragorn) "Well lad, whatever luck you live by, let's hope it lasts the night." Legolas: "Your friends are with you, Aragorn." Gimli: "... Let's hope THEY last the night..."
"I will be dead before I see the Ring in the hands of an Elf! Never trust an Elf!" (one of his first lines in the first film, directed towards Legolas)
Gimli: "I never thought I'd die fighting side-by-side with an Elf" Legolas: "What about side-by-side with a friend?" Gimli: "Aye...I could do that".
"There's plenty for the both of us, may the best dwarf win."
Trivia
The name Gimli first appeared in Tolkien's works in The Tale of Tinúviel, the earliest version of the story of Beren and Lúthien Tinúviel, found in the second volume of The Book of Lost Tales. Here, the name belongs to an aged Elf, a fellow prisoner of Beren in the kitchens of Tevildo, Prince of Cats (forerunner of Sauron).
During the writing of The Lord of the Rings, as told in The Return of the Shadow, Gimli's character was first named Frar, then Burin, and he was the son of Balin. Later, Tolkien apparently considered having Gimli die in Moria, but changed his mind.
Gimli is the name of the heaven above Asgard in Norse mythology. Within the Tolkien legendarium, Gimli means "star", and thus might be an intentional choice.