One of the earliest attestations of the phrase comes from the poet Robert Herrick in his Hesperides. In the 1650 edition, a two-line poem was added:
NO PAINS, NO GAINS.
If little labour, little are our gains:
Man's fortunes are according to his pains.
— Hesperides 752.