From the Super Mario Wiki
A Gritty Goomba is a type of Goomba that appears in Mario & Luigi: Superstar Saga. They appear to be swathed in cloth, resembling a mummy, and they don a pair of sunglasses, with a spike and colored flag protruding from its head. The Gritty Goombas appear in Teehee Valley, occasionally appearing with Spiky Snifits. A stronger variant, called an Elite Gritty Goomba, can be found in Gwarhar Lagoon. Gritty Goombas are capable of summoning sandstorms and using them as a cover while trying to run into the Mario Bros., who must counter with their Hammers.
During the events of the game, Mario and Luigi had to protect Princess Peach from these Goombas as she crossed Teehee Valley to get to Little Fungitown. If they let one get too close, or else left her offscreen too long, it would grab the Princess and drag her down a Warp Pipe to an underground base, which Mario and Luigi can infiltrate to save Peach. If the player returns to Teehee Valley later in the game, most of the Gritty Goombas are replaced by Anuboos, save for the ones in the Warp Pipes.
In Mario & Luigi: Superstar Saga + Bowser's Minions, Gritty Goombas appear as enemies in Minion Quest: The Search for Bowser. They are melee troopers, and attack by charging into minions. Their special skill is Rocket Headbutt, which allows them to jump headfirst into a minion. Due to the spike on their heads, attacking from above damages the minions.
Names in other languages