My (annoyingly) omnitalented friend Eric Felten sends this along:

Hi Jonah,
Hope youโ€™re doing well.
The expression was not widespread until the 1970s (interestingly, because perhaps the average person didnโ€™t come into contact with lots of government work until then).
But there are two competing claims for the expression worth considering. The first, according to โ€œProjection of War: Hollywood, American Culture, and World War IIโ€ says that the phrase originated in Hollywood: โ€œThe ironic catchphrase that studio system personnel coined during the Second World War โ€” good enough for government work โ€” slighted not the significance of the work but the competence of the government to evaluate it.โ€
But I think the more likely origin can be found at the Smithsonian Institution. According to a biography โ€œSmithsonian Institution Secretary Charles Doolittle Walcottโ€ written by an accomplished scholar, Ellis Leon Yochelson, the original phrase is โ€œclose enough for government work.โ€ The Smithsonian had put out a large document on purchasing which included three pages specifying how display cases and drawers were to be built. According to Yochelson, the instructions detailed โ€œthe kind of wood, its thickness, number of nails, and so forth, and ended with โ€˜or close enough for government work.โ€™ โ€ Unfortunately, Yochelson isnโ€™t clear on exactly when the document was written.
Hope that helps.
cheers,
Eric