Animal muscle does atrophy and gain depending on use.
First, animal muscle does atrophy if the animal is too sessile. However in nature it is hard to be sessile. Consider how physically fit hunter-gatherer humans are in terms of their cardiovascular systems. If you are constantly active you don't need to "exercise" to build muscle - you are getting loads of physical activity. Walking 10km a day or more is normal for most humans without advanced technology. We used to see atrophy in animals a lot more, but with animal welfare laws we usually don't keep animals in tiny cages that prevent them from moving anymore.
Some animals are less lazy than humans: many animals will also instinctively stay active even when provided with the conditions to be sessile, but when forced to not be active we do indeed see muscle atrophy. This is especially true of less intelligent species, because the conditions to be sessile are too rare to waste "instinct space" on, but humans who have a much more broader range of behaviors with far more learning behaviors, so we can become very sessile. The downside of intelligence is that you can use it in self-destructive ways.
Just like humans, animals can also build extra muscle by doing the same thing over and over again: a draft horse will build different muscles than a race horse just because it is using them differently.
Many animals also have physiology that makes atrophy harder. Hibernating bears are known to have special adaptations to prevent atrophy because hibernation is defined as long periods of inactivity. But we only only see this in animals that have something like hibernation or have drastically different muscular systems.
So why is a gorilla so much stronger?
Well to start, wild male gorillas mass between 130 to 260 kg. Note that gorillas in captivity often become overweight weighing even more. They have short legs so we don't realize how much bigger than us they are. For scale, Andre the giant (a human far outside the normal range) masses about as much as a large but normal range male gorilla. But there are several other factors.
Humans’ muscles are weaker than other primates’ in significant ways. We have traded strength for much better endurance and fine control of muscles - we do indeed have a significant difference in muscle composition and possibly muscle fiber recruitment, although it is hard to test the latter - you can't tell a gorilla to contract one muscle as hard as they can. As a gain however humans have amazing endurance for any animal and far finer motor control than any other primate. An active human can have better endurance than almost any other terrestrial organism, humans can walk a horse to death, that is a human walking side by side with a horse can keep going long past the point the horse has died from exhaustion.
Gorillas are only stronger in some aspects, a gorilla upper body is certainly stronger, gorilla have large arms and a deep chest drastically increasing the muscle mass of the arms compared to a humans. But the best human could probably beat the best gorilla at kicking power, gorilla legs are comparatively small. To use Andre the giant again, Andre has a lot more muscle mass in his legs than a gorilla and the gorilla has a lot more in the arms, humans have long well-muscled legs. Like all things, genetics can set you up with better musculature, and you will keep it as long as it gets some use.