Most asteroids are small, but they do have gravity and they can affect any object that comes too close. The more iron and nickel in the make-up of an asteroid, the greater its mass and gravity. Scientists also use the aggregate of metal in asteroid classification. Using an infrared sensor, we are able to tell if asteroids are classified as light or dark.
The lighter ones have more metal than the darker ones. When it comes to gravity or asteroids, it exists, but it is very weak. The gravity of an asteroid is proportional to its mass as well as closer, and it's distance. If there is even the smallest bit of mass, there is gravity.