yat tad agre viṣam iva pariṇāme 'mṛtopamam tat sukhaṁ sāttvikaṁ proktam ātma-buddhi-prasāda-jam
Translation
That which is like poison at first but in the end like nectar—that happiness is declared to be sattvic, born of the purity of one's own mind due to self-realization.
What it means
True happiness may feel bitter at first, like discipline, but becomes sweet later. It comes from understanding the soul and God.
Word by word
yat—that which; tat—that; agre—in the beginning; viṣam iva—like poison; pariṇāme—at the end; amṛta—nectar; upamam—compared to; tat—that; sukham—happiness; sāttvikam—in the mode of goodness; proktam—is said; ātma—self; buddhi—intelligence; prasāda-jam—satisfactory.