I wanted to know how can I make a background image that I have turned into a gray with grayscale effect turn into back into color (not the complete image but parts they have clicked) via a coloring brush as the user holds down the left mouse button.

You would have to achieve this with two layers. The layer below would be the image, the layer above would be the grayscale layer. IIRC, you want to set the grayscale layer to not be transparent, give it the effect 'Grayscale Mask' (or you might have to use 'Adjust HSL Mask' and reduce saturation to -100), and set Force Own texture for that layer to 'yes'.

When the user paints, have them create objects with the 'Destination Out' blend mode on your Grayscale layer.