Very useful article on the topic:
Here is the essence:
The idea is to create gradient in 16-bit mode, and then convert it in 8-bit mode, following procedure for manual dithering (using custom dithering layer). Here is the procedure:
1.Turn off default dithering (Edit > Color Settings un-check Use Dithering), because we're going to make our own dithering "engine"
2.Create a new layer (should be topmost).
3.Fill it with solid 50% gray.
4.Filter > Noise > Add Noise. (Amount 25%, Distribution-Uniform, Monochromatic-checked)
- Hit Ctrl+F to repeat the noise filter on the same layer.
6.Set the layer to Linear Light.
7.In the Layers palette, set Opacity to 1%, Fill opacity to 19%.
Important: You need to flatten the image (including the noise layer) while in 16 bit mode and only then convert to 8 bit mode for export. If you do it the other way around, you'll lose all 16 bit information first, and then the noise layer will do precisely nothing in 8 bits. Also, mind Photoshop's Use Dither setting. You can use either the layer or the native dithering method, but don't use both during conversion, it results in twice the noise you need.