The quality of mercy is not strained;
It droppeth as the gentle rain from heaven
Upon the place beneath. It is twice blest;
It blesseth him that gives and him that takes:
Tis mightiest in the mightiest; it becomes
The throned monarch better than his crown:
How is mercy twice a blessing? 
 This is the buildup to Portia’s statement about mercy being an attribute of God. 
 Why the rain metaphor? 
 
 Rain from the heavens (as oppose to just the sky) would be considered something holy and cleansing. 
 Notice the use of “gentle,” indicating that mercy is also  forgiving . 
 
 The  juxtaposition  of “place beneath” and “heaven” may also suggest one must have higher status in order to truly be able to show compassion to the lesser. 
 Similarly, just as you can’t force the rain to fall from the clouds, you can’t force or “strain” mercy – it has to well up and emerge of its own accord, just as the “gentle rain from heaven” does upon the earth.
The Quality of Mercy