The Reading of Megillat “Ruth” on Shavuot has its roots in Masechet Sofrim.
There are a number of suggestions as to why it is read.
Shavuot is time of harvest, and the drama of Ruth takes place in the harvest season. Furthermore, Boaz fulfilled the agricultural Mitzvot in an exemplary fashion. Ruth is the paradigm convert, and accepted the Torah, and we all “converted” at Mt. Sinai. Ruth was the progenitor of King David, whose birth and passing fell on Shavuot. (See Sefer Hatoda’a)
The earliest source that I saw is from Yalkut (596), cited in Mishna Brura (490:17) “מה ענין רות אצל עצרת?…ללמדך שלא ניתנה תורה אלא על ידי יסורין ועוני” I wish all of you much Simcha and contentment.
Still, if we are to succeed in Torah we must be willing to sacrifice and work hard.
Chag Sameach