Internet of Things (IoT) technology involves a network of interconnected devices and sensors that gather and exchange information. In smart cities, IoT devices were utilized in several fields including energy, transportation, waste management, healthcare, etc., to improve the overall quality of life and sustainability of the populace. But, as the usage of IoT increases, the cybersecurity and data privacy become a concern of safety. An anomaly detection system helps to identify possible data breaches or cyber-attacks by identifying abnormal data patterns. Deep learning (DL) driven anomaly detection has emerged as an effective and powerful method for identifying abnormal behaviours or patterns in the data domain. This technique leverages the abilities of a deep neural network for automated learning of complex patterns and representations from data, which make it better for anomaly detection task where irregularities cannot be easily defined by handcrafted rules. This paper establishes a new Billiard Based Optimization with Deep Learning Driven Anomaly Detection and Classification (BBODL-ADC) technique in IoT-assisted Sustainable Smart Cities. The goal of the BBODL-ADC technique lies in the proper recognition and classification of anomalies in the IoT-assisted smart city. To obtain that, the BBODL-ADC system applies a binary pigeon optimization algorithm (BPEO) algorithm for the effectual selection of features. Besides, the BBODL-ADC technique utilizes Elman recurrent neural network (ERNN) approach for the recognition and classification of anomalies. Moreover, the BBO system can be used for better parameters chosen by the ERNN algorithm. The stimulation value of the BBODL-ADC algorithm can be executed benchmark database. The achieved outcomes demonstrate the remarkable outcome of the BBODL-ADC methodology of 95.69% and 99.21% compared to existing models under dataset-1 and dataset-2.