Dutch baas, meaning "master," first shows up in Colonial America in the 17th century. By the 19th century, the word was adopted into American English as boss and employed as a word for a work foreman, supervisor, or manager.
By the early 19th century, language commentators, including American frontier author James Fenimore Cooper, viewed the word with distaste, although members of the working class embraced it readily. Part of the success of boss seems to be from an American aversion to the word master, with its aristocratic associations and connotations of subservience—not to mention, it was commonly used by the British.
The 19th century was a productive time for boss in America. It began being applied outside of traditional labor as the name for a criminal gang leader as well as a political dictator. The political use got a big boost from the notoriety of William "Boss" Tweed—a corrupt politician who controlled the politics of New York in the second half of the 19th century.
Boss was also respectfully employed as a word for someone who does something well. That sense is usually used attributively, as in "boss carpenter" and "boss shoemaker," where it indicates a person possessing high skill at a trade or craft. Boss also acquired general connotations of excellence, and by the end of the 19th century, it was established as a noun for things of a superior kind as well as an all-purpose adjective meaning "excellent" or "first-rate."
"Think of her," replied Ned; "I think she's the longest, strongest, prettiest, and costliest craft that ever left the Brooklyn Yard. She's the boss of the navy—she'll be the Queen of the China Seas!"
— George R. Willis, Light and Shadows of Our Cruise in the U.S. Frigate "Tennessee", 1878"It's fine here," went on the garrulous urchin; "this is the boss place, you bet. I've got a job clearin' off the tables. We have fun stealin' puddin', and everything."
— William Henry Bishop, The Atlantic, March 1885