This is a well known effect called "water hammer". It happens at the end of long runs.
When you open the valve you've got a long tube of water that starts accelerating. That tube of moving water has momentum and you can have problems either when you turn the tap off again, and the bolus of water impacts against the blockage, or when the water passes a certain critical speed. At certain speeds going around turns in the pipe can cause the effect you're seeing.
You want to install a water hammer arrestor.
They cost from $10-$40 depending on size, etc. and can be found at home improvement stores, plumbing supply stores, and online, e.g.