Shaykh al-Islaam Ibn Taymiyyah said in Majmoo al-Fataawaa (27/72):
وأما من يأتي إلى قبر نبي أو صالح ، أو من يعتقد فيه أنه قبر نبي أو رجل صالح وليس كذلك، ويسأله حاجته مثل أن يسأله أن يزيل مرضه، أو مرض دوابه ، أو يقضي دينه، أو ينتقم له من عدوه، أو يعافي نفسه وأهله ودوابه، ونحو ذلك مما لا يقدر عليه إلا الله عز وجل ، فهذا شرك صريح ، يجب أن يستتاب صاحبه فإن تاب وإلا قتل . وإن قال أنا أسأله لكونه أقرب إلى الله مني ليشفع لي في هذه الأمور، لأني أتوسل إلى الله به كما يتوسل إلى السلطان بخواصه وأعوانه ، فهذا من أفعال المشركين والنصارى ، فإنهم يزعمون أنهم يتخذون أحبارهم ورهبانهم شفعاء ، يستشفعون بهم في مطالبهم ، وكذلك أخبر الله عن المشركين أنهم قالوا : (مَا نَعْبُدُهُمْ إِلاَّ لِيُقَرِّبُونَا إِلَى اللَّهِ زُلْفَى) الزمر : 3
As for the one who comes to a grave of a prophet, or a righteous person or to what he believes to be a grave of a prophet or righteous person when it is not like that, and asks his need from him such as asking him to end his illness or his beast's illness, or fulfil his debt, or take vengeance from his enemy, or to heal him, his family or his beast and what is like this, from those matters that none but Allaah, the Mighty and Majestic has power over, then this is clear shirk, it is obligatory for (the one falling into it), that his repentance to be sought (so either he repents) otherwise he is killed.
And if he says, "I ask him because he is closer to Allaah than me so that he intercedes for me in these matters, because I seek a means to Allaah through him, just as a means to the ruler is sought through his special counsel and helpers" then this is from the actions of the pagans and the Christians, for they claim that they take their priests and rabbis as interceders, who intercede for them in their requests, and thus did Allaah inform about the pagans that they said, "We do not worship them except that they bring us closer to Allaah" (39:3). And He, the Sublime, said, "Have they taken others as intercessors besides Allah? Say: "Even if they have power over nothing whatever and have no intelligence?" Say: "To Allah belongs all intercession. His is the Sovereignty of the heavens and the earth, then to Him you shall be brought back." (39:43-44)...
Requesting the dead to supplicate entails making them as intermediaries between Allaah and them, from whom intercession is sought - since asking for the supplication of another is the meaning of intercession, so when they go to the dead and ask them to supplicate for them, this is making them intermediaries and soliciting their intercession.