Near the front of many patents there is a statement saying the work was partially or fully supported by a U.S. Government grant. Does that mean that the U.S. Government automatically owns all that IP?
No, under the Bayh-Dole act the law was changed to permit the grantee to own the IP but, of course any deliverables under the grant need to be provided to the granting agency. Before 1980 all IP developed with government $ belonged to the U.S. This change was made to spur the economy.
The Bayh–Dole Act or Patent and Trademark Law Amendments Act (Pub. L. 96-517, December 12, 1980) is United States legislation dealing with intellectual property arising from federal government-funded research. Sponsored by two senators, Birch Bayh of Indiana and Bob Dole of Kansas, the Act was adopted in 1980, is codified at 94 Stat. 3015, and in 35 U.S.C. § 200-212, and is implemented by 37 C.F.R. 401. The key change made by Bayh-Dole was in ownership of inventions made with federal funding. Before the Bayh–Dole Act, federal research funding contracts and grants obligated inventors (where ever they worked) to assign inventions they made using federal funding to the federal government. Bayh-Dole permits a university, small business, or non-profit institution to elect to pursue ownership of an invention in preference to the government.