I don't know of any reason one level of government would be prohibited from taxing itself, though I suspect it would not impose that kind of administrative burden on itself when it could simply re-appropriate funds to the desired locations.
But governments can and do tax other layers of government.
The Tenth Amendment likely prohibits Congress from taxing states in their capacity as states, though it may tax states on terms equal to private actors. For instance, in New York v. United States, 326 U.S. 572 (1946), the U.S. Supreme Court held that New York was not exempt, as a constitutional matter, from paying a federal soft-drink tax for its sale of mineral waters from Saratoga Springs:
By engaging in the railroad business, a State cannot withdraw the railroad from the power of the federal government to regulate commerce. Surely the power of Congress to lay taxes has impliedly no less a reach than the power of Congress to regulate commerce.
There are, of course, State activities and State-owned property that partake of uniqueness from the point of view of intergovernmental relations. These inherently constitute a class by themselves. Only a State can own a Statehouse; only a State can get income by taxing. These could not be included for purposes of federal taxation in any abstract category of taxpayers without taxing the State as a State.
But, so long as Congress generally taps a source of revenue by whomsoever earned and not uniquely capable of being earned only by a State, the Constitution of the United States does not forbid it merely because its incidence falls also on a State.
Whatever the federal government's authority to tax state and local governments, it has chosen to exempt them from taxation on any income "derived from any public utility or the exercise of any essential governmental function." 26 U.S. Code § 115. As far as I know, most states follow the same basic rule, exempting any of their local governments from taxation on income from government functions.
But not everything a goverment does is a "governmental" function. That term is generally distinguished from "proprietary" functions, which generally describes situations where the government is competing with private businesses in traditionally private markets -- like the Saratoga Springs example.