There are two main things that robber barons did that people disliked. One was that they sometimes treated workers poorly. An example of this would be how the Pullman company treated its workers leading to the Pullman Strike. The workers had to live in company housing, which was fine. But then the company cut their pay and did not cut their rent. This was just one example. A second thing that angered people was the fact that the robber barons had so much of the wealth of the country. Rockefeller's Standard Oil Company, for example, had about 95% of the oil refining capacity in the country. It is believed that the richest 1% of the country had about 45% of the wealth.
In these ways, the "robber barons" antagonized the people who felt that they got excessively rich by abusing their workers.