The US operates under a dual sovereignty system. That means that there are potentially 51 definitions of what is a government, the Federal definition and each state's separate definition. That doesn't mean that there are actually 51 definitions but that there are as many as 51.
The federal government maintains a census of governments which purport to count all of the United States' local governments under a uniform definition. There are five basic types of local governments.
Three are general-purpose governments:
Counties, Municipalities, and Townships. The other two types are special-purpose governments:
Special purpose governments are the most diverse in character and some that make the state lists do not pass the federal tests of "Existence as Organized Entity", "Governmental Character", and "Substantial Autonomy". In less formal terms, there have to be people running the thing, it has to do something, what it does needs to be the sort of thing that a government would do, and the organization needs to be able to chart its own course at least some of the time.
State definitions of what a government is vary widely. Nobody seems to have done a survey to publish them all. This is in my bucket list.