The quote is from Electra: for example, in one translation,
ELECTRA
Remember, nothing succeeds without toil.
There's a bilingual version of it here, in English,
Electra
[945] Remember, nothing succeeds without toil.
And in Greek,
Ἠλέκτρα
ὅρα, πόνου τοι χωρὶς οὐδὲν εὐτυχεῖ. [945]
The LSJ dictionary can help to give a more exact translation:
εὐτυχεῖ was, apparently, also used in the sense of "fare thee well" in the close of letters, and on grave-stones.
χωρὶς ("without") and οὐδὲν ("not one" or "none") are both negative words.
So the literal translation is some kind of double negative, as quoted above, for example (my translation):
"Without toil, no success."
IMO this doesn't have quite the same several meanings as the English quoted in the OP.
My first thought, when I read the English phrase "depends on" in the OP, was,
"the more effort, the more success"
The English phrase "dependent on" has two meanings:
One meaning is a discrete, binary or 'categorical' relationship, i.e.
"not one without the other"
A second meaning is a continuous function, i.e.,
"the more of one, the more of the other"
The English version of the phrase admits the second meaning as well as the first; but the Greek is only saying the first.
We do not know why it's a popular quote. Perhaps it suits someone's preconceptions or political agenda, e.g. "the rich are rich because they worked harder than everyone else".
IMO that meaning (comparative magnitude) isn't implied in the original, which is more like Yoda's "Do. Or do not." (There is no try.)
The original also has, IMO, something of a dualist meaning: "no success without effort".
In context, it seems almost a truism, (who knows, perhaps it was already a proverbial phrase in Sophocles' time):
Chrysothemis
What do you urge, then, of those things that I am capable
of doing?
Electra
That you be brave in executing what I recommend.
Chrysothemis
If any good can be done, I will not refuse.
Electra
[945] Remember, nothing succeeds without toil.
Chrysothemis
I know it, and I will share your burden with all my
power.