to gain: to get something of value for oneself, by effort or investment
The picture behind this word is the marketplace. A merchant puts capital to work and comes away with more than was put in, and that return is what this verb names. Its everyday range covers turning a profit and acquiring possessions, up to the sweeping figure of gaining "the whole world" (only to be warned that the trade is worthless if it costs one's own soul).
The New Testament then stretches the same image in a striking direction. To bring a person to faith, or to win an estranged fellow believer back, is described with this very verb: the person won is spoken of as the gain, the profit that the effort brings in. So Paul can say he made himself the servant of all in order to "win" as many as possible, and to win a brother who has sinned is to gain him (κέρδος is the matching noun for the profit itself).
What holds the senses together is that in each one someone ends up richer for the effort, whether the increase is money, a possession, or a human being brought in. The English words shift ("gain," "make a profit," "win"), but the Greek keeps one verb across them all.