OAKLAND, Calif. — The Grand Princess, the cruise ship stranded for days on the high seas off California, sailed into the Port of Oakland on Monday, met by workers in protective gear who marshaled a large-scale quarantine operation for 21 people on board infected with the coronavirus, along with the thousands of other passengers and crew members.

For a harbor with a storied history of shipbuilding during the Second World War, this was a moment of humility in the San Francisco Bay. The ship came over the past week to symbolize both the nation’s fear of the disease and the conflicting political signals that have governed the response.

“We are so relieved,” said Cookie Clark, a retired realtor whose vacation to Hawaii ended on live television as the cruise ship steaming under the Golden Gate Bridge was broadcast around the world. “Floating around was so stressful.”

On a sun-soaked morning, Ms. Clark and her husband joined other passengers on their balconies, waving toward shore as two large tugboats helped guide the vessel through the narrow shipping lane that runs past Alcatraz Island and the skyscrapers of downtown San Francisco. A harbor pilot who had boarded the vessel wearing biologic protective gear navigated the boat at high tide through the bay.