If the hill is long enough fitness plays a bigger role.
I've outclimbed some women who were probably 80 pounds lighter than me.
They did not have the fitness to put out a sufficiently large percentage of their max power for the duration.
Usually it's me getting passed in a very humbling manner. Big power guys, small wiry guys, thin women.
The bike, gearing, technique, conditioning, power/weight, they all play in.
Almost all of them ride hilly routes on a regular basis.
Many fit people who don't ride hills can have a very tough time climbing.