Is there a material function that works like Photoshop's Gradient Map?

No there isn’t a function for it but have a look at this, it works exactly the same in the UE4.