It looks to me that the gradient is being reduced to 256 colors mode for display, and poorly too.
If your system has a limitation that a 256 color graphic is required, you might be able to produce a better looking one yourself.
For example, starting with your gradient save as a .GIF file. This will reduce the colors to 256 using an algorithm designed to give optimal results. Use the gif file in your application.