Wireless sensor network (WSN) is widely used in many fields, including agriculture, military, healthcare, monitoring, and surveillance. WSN application increases day by day due to growth in embedded and internet technologies. However, data security in WSN is challenging, and different types of attacks are increasing. Traditional intrusion detection methods analyze and identify attacks such as Denial of Service, anomaly detection, wormhole, sybil, and blackhole. Traditional methods never addressed the application layer's novel attack, such as the delete attack. Unique DELETE attack (DA) forms in the application layer and targets web servers and applications. Since unique DA use uniform resource locator requests, distinguishing them from legitimate traffic becomes difficult. The unique DA classify as unique (or) single, multiple, and repeated unique DELETE attacks; for detecting the unique DA types, gradient thresholding-long short-term memory (GT-LSTM) algorithm is proposed using packet per second and traffic rate data in WSN nodes. GT-LSTM algorithm detects unique DA through different thresholding at the training option layer in LSTM. Different gradient thresholding values in LSTM reduce the exploding gradients which fail to detect the unique DA nodes. Gradient thresholding in LSTM layers lies 1 to 3 for detecting unique DELETE attack nodes. The proposed method reduces detection time, improves accuracy, and identifies the hidden node that performs a unique DA in WSN. The unique DELETE Attack identification and performance through the proposed GT-LSTM is analyzed in the NS2 simulation environment and the test bed of WSN. Forms the experimental and simulation results, GT-LSTM performs better than fuzzy, KNN, and linear regression-based intruder detection systems. The proposed algorithm achieves 99% accuracy in detecting the DELETE attack nodes in WSN.