Gimli IMHO was, as a comical relife, often based on the Hobbits version of silly wild little men The Hobbit was written to entertain 8-12 year old kids. Still a good book for any age it's in that light we have to view it.
The elves for example is fairies rather than the kind of Elves he had in mind in other texts. Especially in Imladris presented like a bunch of trolololololo-singing, mean joking, doped hippies And the dwarves are ofc presented in the same not serious fashion.
Concerning their background the vala Aulë (valar is rather megamighty angels) made them in secret but they were accepted, granted life and adopted by the creator (real God) Eru Illuvatar. Only the vala Yvanna, Aluë's wife, is known to disliked them in a way - so she made sure the Ents would come to guard the forests hehe.
The Elves on their part most often considered Dwarves ugly and silly short, but these are hardly worthy of such unfriendly superiority (pride is an elven weakness):Perhaps most intrigueing is that the Dwarves have quite diffrent view on the world, values and reasoning making them very hard to understand for other people many times. Best example of this difference is perhaps from the Battle of Unnumbered Tears (Silmarillion), when their king dies they simply lift the body up and goes singing away while one of the greatest wars of the First Age rage fiercly around them - and nobody dares to stop them!Since they were to come in the days of the power of Melkor, Aulë made the Dwarves strong to endure. Therefore they are stone-hard, stubborn, fast in friendship and in enmity, and they suffer toil and hunger and hurt of body more hardily than all other speaking peoples; and they live long, far beyond the span of Men, yet not forever. - Quenta Silmarillion
Gimli as well is like his kin in The Hobbit quite hasty and enthusiastic (see the parts when they enter Khazâd-dûm as example) but it that is rather a resonable personality trait or cultural feature than the pure fun it was meant to be in The Hobbit.Concerning the forest (assume you are thinking of Lórien) nobody was guilty but the entire Fellowship was spotted when they entered the realm. And, as trivia, they all were said to bread very loud - or they possibly meant only that Sam breath so loud; not Gimli.'Men need many words before deeds. My axe is restless in my hands.' - Gimli, TTT; The King of the Golden Hall