Security is considered a major challenge for the applications implemented in cloud infrastructure. Cloud uses distributed technologies and is vulnerable to suspicious activities. Denial of Service (DoS) attack is a major issue for users, who use computers linked to the network. This paper presents a model for discovering DoS attacks in the cloud using authentication and access control. In authentication, mutual authentication between the cloud user and the server is executed with various security attributes. The security is provided using a hashing function and Elliptic Curve Cryptography (ECC) to resist various attacks. After authentication, the access control mechanism is performed to mitigate DoS attacks from the cloud. The user behaviors are recorded in the web log file, from which significant features are chosen. The selected features are subjected to the proposed Grasshopper Optimization Algorithm-based Neural Network (GOA- NN), which is designed by training the Neural network (NN) using GOA, to detect the DoS attack. The efficacy of GOA-NN is superior considering detection rate, accuracy, precision, and recall with values 0.857, 0.8, 0.866, and 0.875 respectively.