I dont see how a gorilla would stand a chance against either. The lion has fangs and claws, all the gorilla has is strength that is only really useful against smaller gorillas. Animals that are social develop a need to be social at every level, including defense. Its not that he will be saved by another gorilla, but more likely to be alerted to an attacker approaching. Applied intelligence in defense is really only good in social communicated coordination, planning and tools. Against size and speed, its not especially useful.
Between the bear and lion, assuming you mean a large bear like a Kodiak, I would probably give it to the bear, The bear can not attain the speed of the lion, but it wouldn't have to. It has fangs and claws too, as well as strength. Plus, it can rear up and strike from above, giving it high ground.
The lion is at a further disadvantage because its claws and fangs work better for capturing prey at speed than peer combat. It is effective in a chase against an otherwise defenseless animal that only can run away.
A bear of size is not likely to yield to a lion. Since there is no chase, the lion is at a disadvantage. Unlike attacking a gazelle, trying to use teeth and claws puts the lion close enough to the bear to take sustained damage, from above no less.
Its not that the bear cannot take damage also. But its difficult to imagine the lion will keep suffering strikes from angles it cannot see while trying to attack, where as from above, the bear can see what is being attacked and react.
Further, the fangs of a lion work to hold prey. That means the lion has to stay in position, whereas the bear can strike, release and strike again. The bear also has the advantage of being able to use its claws while standing upright in a balanced position. For the lion, using its forward claws means compromising its balance momentarily...