As Russ already pointed out, the problem to be solved was a rather "fundamental" one concerning black body radiation. In fact it was not "just" conflict with experiment, it was a *fundamental* difficulty in classical theory.
The problem was: what's the THERMAL EQUILIBRIUM of the electromagnetic field with matter. Now, it was VERY WELL established that thermal equilibrium in classical physics occurred when EACH DEGREE OF FREEDOM of the system had an average energy of 1/2 k T, with k Boltzman's constant, and T the absolute temperature. This is called the "equipartition rule". It finds its origin in the fact that if you distribute energy that way, you arrive at the largest number of "equivalent" microstates - which is exactly what equilibrium is supposed to mean. Now, as long as a system has a FINITE number of degrees of freedom, there's no problem: you take your energy budget, divide it over that number of degrees of freedom, and you have your temperature. OR, you have your temperature, give each degree of freedom its energy 1/2 kT, and summing, you find your total energy.
But you run in a serious difficulty if you consider an INFINITE number of degrees of freedom, such as is the case with the EM field. Even in a cavity, there's an infinite number of EM modes, because frequency is not limited upwards. So if you use this equipartition rule for EM, you end up with: 1) infinite energy in the EM field, and 2) most energy in the high frequency modes (of which there are many). In other words, from the moment you have non-zero temperature, you would have something like a strong X-ray and gamma ray source.
This was of course not only experimentally not observed, but was even nonsensical from the purely theoretical PoV, because it would mean that any system with a finite amount of energy, coupled to an EM field, would end up at T = 0 K (ALL of its energy would be sucked up by the EM field in its way to establish thermal equilibrium).
This was the fundamental difficulty classical physics faced and which was solved by Planck's totally ad hoc hypothesis of saying that EM modes could only exchange energy with matter in "lumps" of hv.
By just making this hypothesis, and applying some statistical reasoning to it, Planck could show that he found an energy distribution curve for an EM field in thermal equilibrium which corresponded to the empirically observed "black body" radiation curve".