Inspiring by nature have motivated many researchers in many fields of sciences and engineering. The Gravitational search algorithm (GSA) is a recent created metaheuristic algorithm by using law of gravity and mass interactions. In this paper, a new operator inspired by some of the characteristics of the black hole as an astronomy phenomenon for GSA is presented. When a star is converted to a black hole under situations, it has the extremely strong gravity that prevents anything to escape from, and the objects that are closed to the black hole, experience very strong force called tidal force which it causes to collapse them to the black hole. We propose a new operator using these features and hybridize it with GSA (BH-GSA) in order to prevent facing the premature convergence and to improve the abilities of GSA in exploration and exploitation. The proposed algorithm is applied to two sets of standard benchmark functions. The first set includes 23 standard benchmark functions and in this set the performance of the proposed algorithm is compared with the standard GSA, the disruption GSA, the particle swarm optimization (PSO), and the real genetic algorithm (GA). The second set contains the CEC 2005 benchmark functions. In this set, we compare the BH-GSA with some well-known metaheuristic algorithms. The obtained results and comparing with the competing algorithms prove that the BH-GSA has merit in the field of continuous space optimization.