1. Create your gradient

2. Effect → Sketch → Graphic Pen...

Unhappy with the size of the dots?
3. Effect → Document Raster Effects Settings... Resolution

Bonus: Colorize
The Sketch effects output is monochrome by nature so you are stuck with a black and white gradient to begin with. You can easily colorize the effect with the use of some blending modes.
Duplicate the shape
Remove the effect (Appearance panel dropdown → Clear Appearance)
Fill with your desired color
Change blending mode (Transparency Panel). Different blending modes will have a different effect.
Lighten Blending mode & blue fill:

Multiply Blending mode & blue fill:

You can also colorize both black and white areas independently with a combination blending modes on different colored duplicates. If you can't get your desired result because the blending modes interact with each other as well as the original gradient—you can use the gradient as an alpha mask on your blending mode shapes.

For this, I used a blue duplicate set to Lighten above the original gradient, grouped the gradient and blue duplicate and used the original gradient as an alpha mask then placed an orange solid duplicate below the group.
