Tropical Storm Nicole gained strength on Tuesday as it churned toward the Bahamas on track for Florida's Atlantic coast, where a hurricane warning was posted for nearly 250 miles of shoreline with millions of residents warned to hunker down and prepare.