Gandalf conferred with Gimli while in Moria, although it was always Gandalf that made the decision. Still, Gimli was very much at home in the caves of Moria and likely provided valuable assistance.
Gimli represented the dwarves in the character development, which to me was a significant part of the story as he and Legolas developed a friendship.
While Aragorn was known in Lothlórien, Legolas was also a key participant in translating to some of the elves that didn't speak in the common tongue. His abilities provided scouting information.
Critical roles? I think perhaps, one of the main ideas of the whole story is that we all play the role we are given. While they may not be characters of the stature of greater elves or dwarves, they rose to the occasion of the role they found themselves in.