I believe that the real source for this custom is a story that happened in
Jerusalem, retold in Sefer Ha'Todaah (Book of Our Heritage) by Rabbi
Eliyahu Kitov (under month of Nissan - pg.337 in first English volume).
"Rabbi Kalonymus Baal Haness, who is buried at the foot of the Mount of
Olives... was instrumental in saving the Jews of Jerusalem from the effects
of a blood libel. The Ishmaelites had killed one of their own children and
thrown him by night into the courtyard of the synagogue in an attempt to
destroy their enemies the Jews. Although it was Shabbat, Rabbi Kalonymus
wrote one of the sacred names of G-d on a piece of parchment and placed
this on the forehead of the murdered child. Immediately the latter stood up
and pointed an accusing finger at the true murderer. But Rabbi Kalonymus
passed judgement on himself for having desecrated the Shabbat and commanded
that after his death whoever passed by his grave should throw a stone
thereon. the people of Jerusalem carried out his wishes, and it became the
custom that whoever passed there added a stone to the heap on his grave."
According to this, placing a stone is not a mark of respect, rather it
implies that the deceased is in need of atonement! However, it's easy to
see how it has become interpreted as a mark of respect, since the graves
that are visited more often are the graves of the more righteous people,
and they always seemed to have the most stones.