According to the Unfinished Tales, Gimli was forbidden to join the quest company for being too young (62), so he was probably not old enough for war either (oddly, his father was present in the Battle of Azanulbizar when he was only 16...). Also, Gimli probably resided in Thorin's Halls in the Ered Luin during the Erebor quest, far away from the Lonely Mountain: only the dwarves in the Iron Hills were close enough to join the battle.
In the Hobbit book itself, there is certainly no mention of Gimli since he did not yet exist when it was written 🙂