The Klingons used a gavel with a large, outstretched arm, and their version of the tool was a metal ball. Courtrooms located on Qo'noS and Narendra III from the 22nd century to at least the 23rd century had this type of gavel, which emitted sparks upon hitting. In 2152, a Klingon magistrate used a gavel during Captain Jonathan Archer's tribunal on Narendra III. The judge in the trial of James T. Kirk and Leonard McCoy also used one, a hundred and forty-one years later. (ENT: "Judgment"; Star Trek VI: The Undiscovered Country)
Adam – one of multiple disciples of Dr. Sevrin, who were brought aboard the USS Enterprise in 2269 – sang a song that contained the word "gavel", upon Captain James T. Kirk refusing to release Sevrin from medical confinement (since he was a carrier of synthococcus novae). The lyrics Adam sang were, "Stiff man putting my mind in jail. And the judge bang the gavel and say, 'No bail.' Gonna lick his hand and wag my tail." (TOS: "The Way to Eden")
Types of gavel
A revised draft story outline for TOS: "Court Martial" (with the working title "Court Martial at Star Base 811", dated 26 June 1966) stated that, during the court martial of James T. Kirk, "An old ship's bell is used instead of a gavel." A gavel was also mentioned once in the final and revised drafts as being used by Commodore Stone, who hammered the tool on his desk in response to Spock and McCoy hurrying into the courtroom with new evidence. However, no gavel is present in the final version of the episode, in which the "old ship's bell" is indeed used instead.
A gavel was also scripted to appear in TNG: "Devil's Due", to be used by Data while acting as arbiter of a trial to determine whether an apparently non-corporeal lifeform was Ardra. However, no gavel appears in the final version of the episode. 
During the scene in which Starfleet meets to discuss the explosion of Praxis in Star Trek VI: The Undiscovered Country, the script stated, "A door opens and STARFLEET ADMIRAL DONALD, austere and impressive, enters and gavels the meeting to order." In a later scene, the Klingon judge's gavel was described as "a grotesque mailed glove," mistaking the gavel for the glove that holds it. 
A concept drawing for the Klingon Star Trek VI gavel was created by Nilo Rodis-Jamero. (The Art of Star Trek, p. 267) Props master Gregory Jein carved the ball shape out of green foam, then had one of his employees in the props department cast the actual ball. Jein was aware of deviating from the red paint scheme commonly associated with the Klingons, opting to give the gavel a weathered steel finish. The prop was made so that streaks of light would burst out of the cracks in the gavel as it was struck. However, there was a difficulty with the gavel's interior light during filming. "The actor got too enthusiastic and the light broke on the second or third take," said Jein. (The Making of the Trek Films, 3rd ed., p. 128)
The Bajoran gavel seen in DS9: "Dax" was sketched by Rick Sternbach and made out of real stone by the art department. (DS9 Season 1 DVD special feature "Deep Space Nine Sketchbook") The script for DS9: "Tribunal" also mentioned a gavel, stating that Makbar was to use "not a gavel but a symbolic rock." 
Writer David A. Goodman was not entirely certain whether the sparks from the gavel in ENT: "Judgment" were added in post-production or involved live pyrotechnics. However, he reckoned that at least some of the sparks were probably added after-the-fact, remarking, "I don't know that there's any way they could have done that live." ("Judgment" podcast/audio commentary)
In the Star Trek: The Original Series novel Savage Trade, Yarnek, while assuming the persona of George Washington, pulls a musket pistol from his jacket and uses the butt as a gavel in order to silence a room during a meeting. While speaking, the room cheers loudly, necessitating him to bang it again several times more.
In the Star Trek: Enterprise novel The Good That Men Do, Nathan Samuels uses a gavel during a meeting with Haroun al-Rashid (β), Jonathan Archer, Thoris, Gral, and other representatives of the Coalition of Planets.