This image of the gilded age as a particularly corrupt time is at least partially a hisoriographical construction of the progressive era which followed it. There was a big push towards efficiency and transparency in government among the cultural elite at that time. This was aimed at curbing the influence of trusts (ie corporations) and political machines like tammany hall.
There were some areas in which corruption and inefficiency were a big problem, like breaks of guage in railroads and plenty of examples of egregious government waste.
However, there is a case to be made that a big part of the push against "corruption" was a retrenchment of traditional elite groups against institutions like tammany hall which were in some ways a voice of working people in government at a time before the traditional party system had realigned around the new deal coalition.