In J. R. R. Tolkien's legendarium, Gamling is a Man of Rohan. He appears in The Two Towers, the second volume of The Lord of the Rings. An older man (he is called "Gamling the Old"), he was from the Westfold.
Gamling means "old man" in Old English, (cf. OE gamol "old") which is used to represent the language of Rohirric. Thus "Gamling" is not the character's actual name. Nevertheless it is a linguistic pun reflecting the character's age. The word and its meaning still survive in modern Scandinavian languages such as; Danish, Norwegian, Swedish and Icelandic.
Gamling understood the language of Dunland and was familiar with the hatred that the Dunlendings had for the Rohirrim.
In Tolkien's book, Gamling is left in charge of the forces defending Helm's Dike (a fortification across the Deeping-coomb before the stronghold of the Hornburg defending Helm's Deep) by command of Erkenbrand. About 1,000 men had been left to defend Helm's Dike, including Gamling's grandson, and Gamling notes that most of the defenders were either very old (like himself) or very young (like his grandson).
King Théoden of Rohan arrives at Helm's Deep with reinforcements from Edoras on March 3, 3019. As the forces of Isengard approach, Gamling and his men pull back from Helm's Dike and enter the stronghold of the Hornburg. Gamling hears Gimli's warning that Orcs have entered a culvert under the wall and leads the Men of the Westfold in a charge that drives them back.
Gamling then asks Gimli to help block up the opening with small boulders and broken stones with the remark, "We must stop this rat-hole. Dwarves are said to be cunning folk with stone. Lend us your aid, master!" However, Saruman's forces later breach the Deeping Wall using an explosive device. Gamling retreats into the Deep with Gimli and Éomer. There they defend the narrows before the entrance to the Glittering Caves until dawn, when Gandalf and Erkenbrand arrive with reinforcements, and the Battle of the Hornburg is won.
In the movies he accompanies King Théoden and plays a role in directing the construction of added defences in the Hornburg and the arming of every available man prior to battle. Gamling serves as a sort of page to Théoden and arms him. In the DVD extras, Bernard Hill (who plays Théoden) explained that he did not think Théoden would seem very authoritative if he was shouting out his own orders; he felt a king should have a lieutenant that shouted out the king's orders to his troops, so Gamling's character was expanded to follow Théoden around throughout the movies.
In The Lord of the Rings: The Two Towers Gamling seems to be right hand man to Háma, captain of the King's guard at Edoras, and takes over most of the duties of the captain of the guard after Háma's death. Gamling is among the defenders of Helm's Deep who ride out to meet the Orc forces before the fortuitous arrival of Gandalf and the reinforcements under Éomer.
He is also present at the Battle of the Pelennor Fields in The Lord of the Rings: The Return of the King;