Because the Sun is the largest, most massive object in our solar system, it also has the strongest gravitational force in our solar system. It pulls every one of the planets (and everything else) toward its center of mass. so to answer your questions yes there is gravity in our sun