This paper introduces the Cosine-Gated Long Short-Term Memory (CGLSTM), a novel architecture that integrates a cosine similarity-based gate with the vailla LSTM framework to improve sequence prediction accuracy. It addresses long-term dependencies in sequence data. Through experiments across multiple datasets and tasks such as the adding problem, MNIST and Fashion-MNIST classification, IMDB sentiment analysis, and language modelling on the Penn Treebank, the CGLSTM's performance is evaluated against LSTM, Gated recurrent unit, Recurrent Attention Unit, and Transformer models. Additionally, its effectiveness is demonstrated in the SocNavGym environment, highlighting its potential for real-world applications. Results show the CGLSTM model's superior capability in complex sequences, providing evidence that the integration of cosine similarity into LSTM leads to a 17% improvement in predictive accuracy and efficiency, offering a promising solution for various deep learning applications.