Praying at "holy gravesites" is a time-honored and widespread Jewish practice. Of course, praying to the dead or even asking them for information, holding seances, etc. is clearly prohibited (see Deut.18:11) and is related to the commandment against idol worship. Nobody thinks that Caleb was praying to Abraham, Isaac or Jacob

In discussing the verse "They went up through the south and [he] came until Hebron..." (Num. 13:22) the Talmud interprets it to imply that Caleb, the only one of the twelve spies besides Joshua who did not slander the land of Israel, came to Hebron alone. (see also Joshua 14:6-15) Why did Caleb make this solo side-trip? "He went to prostrate himself upon the graves of the Patriarchs. He said, 'Fathers of the world, pray for me that I be saved from the evil counsel of the other spies'." (Sota 34b)

Nobody thinks that Caleb was praying to Abraham, Isaac or Jacob. Rather, he requested that they add their prayers to his own supplications that Heaven grant him the inner strength to follow through on his good intentions. He prayed specifically at their burial site in order that their merit combined with the holiness of their final resting place help make his prayers more acceptable. The holiness of these gravesites is derived from the lingering connection of the soul to its point of final departure…

The holiness of these gravesites is derived from the lingering connection of the soul to its point of final departure from the body after burial. Many of the previously unknown burial sites of famous tzadikim in the vicinity of Safed were first identified by the holy Ari (Rabbi Yitzchak Luria - 1534-1572) who was able to sense the presence of the specific soul hovering about each place. This presence is especially strong on the tzadik's yahrzeit (anniversary of the passing).

The Zohar [III:70B ff - quoted in Tanya IV: 27 (p.292)] states that without the prayers of tzadikim, the world would not endure for a single moment. Tzadikim shield the world - even more so after their death than in their earthly lives. A striking example is the Matriarch Rachel, who, we are told (Midrash Rabba; Rashi and Ramban on Gen. 49:7; haftorah, 2nd day Rosh Hashanah ) was buried on the highway at BethLehem so that her descendants in exile after the destruction of the First Temple could pray at her grave and she could pray for them. Also, the Midrash movingly depicts (c.f. Meam Loez on Gen. 37:36) a distraught Joseph tearing himself away from his captors and weeping hot tears over his mother's grave. It is a long-standing custom to visit gravesites and to exhort the tzadikim

In our days, we too, utilize this same principle of calling upon the merit of departed tzadikim, their benevolent prayers, and the holiness of their final resting places. In fact, not only is this practice permitted, it is recommended; and in certain situations, such as severe droughts, it is actually legislated. (Taanit 16a)

Moreover, the model of Caleb praying at the burial site of the Patriarchs is extended not only to the resting places of tzadikim but also to one's personal forebearers. One of the classic halachic commentators, the Bach (Rabbi Joel Sirkes 1561-1640, in Yorah Deah, end of 217) strongly approved the practice of praying at one's ancestors' graves in times of difficulty, since their merit can intervene to help avert an unpleasant decree. Indeed, it is an almost universal Jewish custom to visit the graves of close relatives on the anniversary of their passing and to pray there.

Before Rosh Hashanah, and especially on the day before the holiday begins, it is a long-standing custom to visit gravesites and to exhort the tzadikim there to intercede for us on the day of judgement. However, we do not direct our prayers toward the dead who rest there; rather, we implore G‑d to have mercy on us for their sake. (Kitzur Shulchan Aruch 128:13)

May our prayers find favor in G‑d's eyes.