Gravity does almost no work on a bowling ball rolling along an alley because the ball is not moving in the direction of gravity. Work, as defined by physics, is a function of both force and distance traveled in the direction of the force.
If a bowling ball rolls down a hill, then gravity does work on the ball because the ball is traveling in the direction of gravity. Interestingly, while the bowling ball is rolling down the alley, there also is very little work being done on it by the person who threw the ball. All of the work occurs before the ball is released when the bowler is throwing the ball. Once the ball leaves the bowler's hand, however, that person can't exert force or do work on the ball anymore.