Both these terms have strange histories in which their meanings changed radically. In the case of hoi polloi, it now has two opposite meanings!
Hoi polloi originally meant “the many, the masses of common people.” And educated people still use it mostly this way. However, nowadays some people use hoi polloi to mean “rich, snobby people.” But this second meaning is a mistake. Probably because hoi polloi was, at first, used mainly by educated people to describe the common people—so it became associated with rich, snobby people in the minds of many people; and so, some people use hoi polloi to mean “rich, snobby people.” However, hoi polloi should probably be used only to mean “the common people.”
Hoity-toity made a similar change; it originally meant “frivolous, not important” but now it describes people or businesses that are trying to appear very high-class and important—not necessarily real wealth or importance, just upper class style, or pretensions, as we might say.