Welcome to Just Answer and thanks for your question. It is far more complicated than gray clouds "containing rain." Here is an excellent site that gives some simple lessons about clouds. http://mapmaker.meteor.wisc.edu/~jbrunner/ackerman/sm-clouds/cloudbkgrnd.html
Low-lying, dark gray, well-formed clouds (Stratus clouds) are often seen along coastlines and after fog. They also may appear when cold, moist air is conveyed horizontally over a region. The stratocululus clouds vary more in color than stratus but also occur when horizontal cold air pushes over warmer air. They often accompany cold fronts. Less well-defined gray clouds often accompany warm fronts, which do often foretell rain.