The Yamato dynasty, the ruling house of Japan, claims to have been on the throne since about 600 BCE, which would make that a 2600 year run. There is solid historical evidence for the family line since the 6th century that is generally accepted by scholars, so that's 1500 years of a single ruling family (although the emperor was not always in real control, those in control always claimed to rule in his favor, whether they really did or not is another story entirely).
That's the longest I can come up with, unless you count Pharonic Egypt, as /u/reslumina/ mentioned, but they have several "intermediate periods", dozens of dynasties, and even an "old" and "new" kingdom, so I'm not sure you can really claim that as the "same" government the whole way through.
National governments, or smaller governments as well? The oldest continuously inhabited cities are in the fertile crescent like Aleppo, presumably those cities have had some form of self governance for many thousands of years.
This submission has been removed because it violates the rule on poll-type questions. These poll-type questions do not lend themselves to answers with a firm foundation in sources and research, and the resulting threads usually turn into monsters with enormous speculation and little focussed discussion. “Most”, “least”, "best" and "worst" questions usually lead to vague, subjective, and speculative answers.
For questions of these types, we ask that you redirect them to more appropriate subreddits, such as /r/history or /r/askhistory.