The aim of this paper is twofold. First, black hole algorithm (BHA) is proposed as a new training algorithm for feedforward neural networks (FNNs), since most traditional and metaheuristic algorithms for training FNNs suffer from the problem of slow coverage and getting stuck at local optima. BHA provides a reliable alternative to address these drawbacks. Second, complementary learning components and Levy flight random walk are introduced into BHA to result in a novel optimization algorithm (BHACRW) for the purpose of improving the FNNs' accuracy by finding optimal weights and biases. Four benchmark functions are first used to evaluate BHACRW's performance in numerical optimization problems. Later, the classification performance of the suggested models, using BHA and BHACRW for training FNN, is evaluated against seven various benchmark datasets: iris, wine, blood, liver disorders, seeds, Statlog (Heart), balance scale. Experimental result demonstrates that the BHACRW performs better in terms of mean square error (MSE) and accuracy of training FNN, compared to standard BHA and eight well-known metaheuristic algorithms: whale optimization algorithm (WOA), biogeography-based optimizer (BBO), gravitational search algorithm (GSA), genetic algorithm (GA), cuckoo search (CS), multiverse optimizer (MVO), symbiotic organisms search (SOS), and particle swarm optimization (PSO). Moreover, we examined the classification performance of the suggested approach on the angiotensin-converting enzyme 2 (ACE2) gene expression as a coronavirus receptor, which has been overexpressed in human rhinovirus-infected nasal tissue. Results demonstrate that BHACRW-FNN achieves the highest accuracy on the dataset compared to other classifiers.