Plants and animals need each other to survive in an ecosystem. They are also the two life forms in an ecosystem--and without life, there is no ecosystem.
Pollination is a vital part of an ecosystem's functioning and health, according to the Ecological Society of America's fact sheet on pollination. Bees and hummingbirds pollinate flowers by transferring pollen from one flower to another, thereby ensuring their survival as a species. These animals also need the flowers. For instance, hummingbirds pollinate when they drink nectar--their primary fuel source--from flowers.
Plants and animals are part of a food chain, which keeps an ecosystem alive. Carnivores eat herbivores, which eat plants. When animals die, they decompose into the soil. Their nitrogen transforms into nitrate, which plants require for growth. Herbivores eat these plants, and the cycle starts again.
Besides affecting each other, animals and plants also influence the rest of the ecosystem. For instance, trees produce oxygen and lower forest temperatures. This enables animals--including humans--to live comfortably in the ecosystem even during warm months.