I believe it is Midworld by Alan Dean Foster.
Midworld is a planet entirely covered by a rain forest three-quarters of a kilometer (almost half a mile) tall. Born is a member of the primitive human society that has lived peacefully on Midworld for hundreds of years, careful not to disturb the natural balance of the jungle. His people live in a gigantic tree called the Home Tree. When they die, they are ceremonially buried in another gigantic tree of a species called They-Who-Keep. Each of the locals forms a lifetime bond with a powerful and intelligent photosynthetic animal called a furcot. When they need to damage a plant they are familiar with, they communicate with it empathetically ("emfoling") to make sure it does not object.
The world is disrupted by the arrival of an exploitative business venture from Earth whose representatives know nothing of the delicate stability of the planet. A man and a woman from this company crash in their aircraft near Born's home. He, a fellow hunter named Losting (both hunters are in love with the tribe's most beautiful girl), and their furcots lead the castaways safely through the jungle's surprising dangers to their station.
Born realizes that the newcomers are on his world to gain a life-extending drug from the burls formed by the They-Who-Keep trees around buried people. Horrified by this discovery and the invaders' callousness toward living beings, he uses native plants and animals to destroy their station. In the final fight Losting is killed, but Born returns to the Home Tree. Losting's brain and mind are absorbed to form part of a developing planet-wide network of consciousness involving They-Who-Keep and the furcots.
Other books with giant forests are Hothouse by Brian Aldiss and Earth in Twilight by Doris Piserchia.