The word ладный means good, balanced, just, harmonious.
By extension, ладно means "okay, well". As a standalone word, it means agreement after period of hesitation.
Yet by extension, ладно тебе means "enough of that", as in "this is well enough for you, so you should stop doing that":
― Ладно тебе жалеть-то, ― махнул он рукой. [...