Realism (1848-1900) followed Romanticism (1780-1850) in both the artistic world and the literary world. Realists were initially rejected by the art community because the art of the period spoke against the art of the earlier period (Romantic). Romantics tended to blur over the realities of life.
Realists, on the other hand, took a more objective view towards their art. They desired to show life as it really was (without using a "rose-colored lens"--like the Romantics).
Given the work of the Romantics showed life idyllically and the Realists showed life as it was, many appreciators were not ready to let go of the imagined and perfect images the Romantics showed them. The work of the Realists, like Edgar Degas, depicted life of the worker, the mother, and (famously) the dancer. These pieces were objectively completed, no "rose-coloring" allowed.
Essentially, the public was not ready to see real life depicted in the art they admired and bought because it did not allow for the idyllic the previous period allowed for.