Target localization is one of the most widespread applications of WSN (Wireless Sensor Network). However, in a number of specific harsh scenarios, physical location of anchor node may drift because of influence of external environment or human factors, which in turn leads to the estimated location of unknown node is not accurate. Therefore, a reliable node localization algorithm for WSN based on weighted AHP-GRA is proposed in this paper. Firstly, distance change among nodes in localization scenarios is counted and reference sequence is constructed, then comprehensive influence matrix is obtained by environmental factors. Next, the weighted comprehensive influence matrix is further obtained by combining the two. After that, the node confidence level is obtained based on AHP-GRA, and three reliable nodes with the highest confidence level are taken as anchor nodes to complete localization by using trilateral localization method. Simulation results show that the algorithm in this paper effectively improves localization effect of WSN in complex scenes. Compared with other algorithms, the algorithm in this paper has great advantages in selection of reliable nodes, localization accuracy, and localization coverage.