The cavitation erosion resistance of an X5CrNi18-10 stainless steel, solution treated at temperatures in the range of 1000–1100 °C for 5–50 mins, was investigated using a piezoceramic vibrating system. The variation of the technological parameters led to changes in the degree of the chemical homogeneity and the grain size of the austenite. Heating at 1050 °C for 25 mins, followed by water quenching, led to an increase in the cavitation erosion resistance of about 2.45 times compared to the samples heated for 50 mins. A significant improvement of the cavitation resistance was obtained for the sample maintained at 1050 °C compared to the samples annealed at 1000 and 1100 °C. It was found that the associated cavitation erosion resistance is improved for finer granulation and for higher degree of chemical homogeneity of the austenite.