Note: Before we jump into discussing Gimli in The Two Towers, you might want to take a peek at Gimli's "Character Analysis" for The Fellowship of the Ring for some background.
Like Legolas, Gimli is mostly a background player in The Two Towers. He runs after the orcs who kidnapped Merry and Pippin and his ax gets a good workout against Saruman's army at Helm's Deep, but he doesn't have a unique plot line all to himself. While we like Gimli a lot, we still think that, in terms of the trilogy as a whole, he's mostly there to fill out the numbers of the Fellowship.
Even if Gimli isn't at the front and center of the plot of The Two Towers, he is still more three-dimensional than he sometimes gets credit for. In the movies, director Peter Jackson definitely plays Gimli's character for laughs: Gimli jokes with Éowyn about the beards of dwarf women, he has a super-quick temper, he eats and drinks sloppily. Let's face it: he's not a suave guy like Legolas.
But in the book of The Two Towers, Gimli may still be pretty rough around the edges, but he is also quite a romantic. He offers to duel Éomer in defense of Galadriel's beauty (so Gimli's crush on the elf queen from The Fellowship of the Ring is still going strong). He also spends a lot of time being poetic about the Glittering Caves of Anglarond. Check out what he says to Legolas about these caves near Helm's Deep:
And, Legolas, 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. (3.8.51)
This speech sounds a plain sight more serious than anything Éowyn thinks about Aragorn, for example. Clearly, Gimli is crushing on these caverns, and his love gets more beautiful language than even the human love affairs in The Two Towers.
Gimli's great admiration for the beauty of the Glittering Caves gives us a somewhat softer, more complex impression of his character. He doesn't just go around hitting things with his ax. He's got Deep Thoughts going on underneath that bushy beard. And that's why we still love us some Gimli, even if he doesn't have a lot to do in The Two Towers.