The Coast Guard (Revenue-Marine) was established in 1790 when the Tariff Act was signed into law, which authorized the construction of ten cutters. This wasn't for defense at all...it was to enforce the federal tariff and trade laws and fight smuggling. In other words, glorified tax collectors. You might even call them government sanctioned pirates (but not, however, privateers as these were not privately owned vessels operating under letters of marque).
The Navy's origin goes back to October 13th, 1775 when the Continental Congress purchased the first two ships to arm and send against British merchants. Other ships followed, including the authorization to build thirteen frigates (8 made it to sea), and several others outside this. About 65 vessels served at some point, out of which 11 survived the war.
In 1785, Congress disbanded the Continental Navy.
The U.S. Navy was re-established March 27, 1794 and Congress authorized six vessels, the first three of which were:
USS United States
USS Constellation
USS Constitution (which, of course, still exists today)
Admiral Zumwalt, the CNO in 1972, authorized October 13th as the date of celebration of the Navy's birthday, based on the establishment of the Continental Navy on that date in 1775.
For all the puddle hoppers out there who like to say the Coast Guard is actually older than the Navy, screw you. Collectively speaking, the Navy has been around as an actual navy for more years than the Coast Guard, what with having been in existence for 10 years from 1775 to 1785 before having been disbanded for 9 years. That puts the Navy 6 years up on you.
And the Navy isn't a glorified band of tax pirates.