Breel Embolo hit the woodwork as Shakhtar, missing key players through injury, desperately struggled to keep pace with the Germans.
Stindl floated in a corner for Nico Elvedi to head in Gladbach's second goal in the 34th minute before fellow Swiss international Embolo's superb bicycle kick in first-half stoppage time made it 3-0.
The hosts took their foot off the gas in the second half but still added a fourth when Oscar Wendt whipped in a free kick from the right in the 77th minute and the ball sailed across a crowded box and ended in the back of the net.
It was the Foals' first win in their last four Champions League home group games after drawing their last three.
Gladbach are top of the group on eight points and next play Inter Milan before facing Real in their final match.