The boy, along with his mother, brother and father were all taken to Zuckerberg San Francisco General Hospital following the incident, however the boy's mother, brother and father were treated and released from the hospital, according to public health department spokeswoman Rachael Kagan.
PHOTOS: Dozens rescued after boat capsizes off San Francisco
The 4-year-old was initially found unconscious and was not breathing when he was rescued.
The family was on the 34-foot sailboat Khaleesi, which capsized at about 4 p.m. about 100 yards off of Pier 45 in San Francisco, U.S. Coast Guard officials said.
Coast Guard crews were able to rescue 20 people from the water. A San Francisco Fire Department boat crew rescued eight people, while good Samaritans rescued the two remaining victims, according to Coast Guard officials.
Some of the victims had become trapped under the hull, but bystanders, police, firefighters and Coast Guard crews rescued all 30 within 32 minutes, Coast Guard officials said.
"Strong operational partnerships among maritime agencies in the Bay Area were critical today, both in ensuring the waterside security of the Fleet Week air show events, and in emergency response resulting in the rescue of 30 people from the frigid bay waters," Capt. Tony Ceraolo, commander of Coast Guard Sector San Francisco, said in a statement.
But authorities are now trying to figure out what went wrong. Daryl Kehres, the captain of the Blue Star, one of the civilian boats that came to help, is raising questions about the safety of the Khaleesi.
"I saw a lot of what appeared to be kids to me. I don't know what their ages were, but none of us saw anyone wearing a life jacket," said Kehres.
One of the people aboard the Blue Star shot pictures of the rescue effort. Investigators say they don't know if everyone aboard was wearing a life jacket.
"We have not determined what was involved, who was wearing what, that's still under investigation," explained Giselle Talkoff with the SFPD.
"This could have been really, really catastrophic. We had 30 people in the water with one of the days where we had more boat traffic on the Bay than any other day during the year," said Battalion Chief Bob Postell with the San Francisco Fire Department.
In all, five adults and the three children were hospitalized.
Fire officials did not say where the other child and three other adults were hospitalized. Information about the remaining four victims was not immediately available.
Bay City News contributed to this report.
PIER 45 BOAT CAPSIZED WITH ABOUT 30 JUV ON BOAT SOME ARE TRAPPED UNDER THE HULL. USCG BOAT/HELIO/DIVERS EN ROUTE. pic.twitter.com/KnEKFVgpjx— San Francisco Fire (@sffdpio) October 8, 2016