Although it seemed to be an innocent mistake, the Skipper was a scurvy rogue who knew there was going to be a bad squall. His diabolical plan was to "shipwreck" the Minnow (nudge nudge, wink wink), ransom Thurston Howle III for all his loot, and being a completely unscrupulous cad, have his way with Lovely and Ginger as well! (A.K.A.: bonus booty).
The Skipper's evil plot was foiled because he had underestimated his 1st mate. Gilligan was actually a brilliant detective who had been investigating nefarious goings-on at The Tropic Port, and had traced them to the Skipper and his gang of scoundrels. His bumbling goofy demeanor (a la Colombo) and seemingly silly high-jinks enabled him to thwart the Skipper at every turn, while at the same time keeping the other castaways from becoming alarmed.
The Professor got hip to what was going down pretty quick, and assisted Gilligan in any way he could. Although most of the engineering ideas came from the Professor (coconut telephones, etc.), he actually had to consult Gilligan for a lot of his more hard-core science diversions, since Gilligan had PhDs in both nuclear physics and organic chemistry.
Most of the sexual tension in the show arose from the 3-way love triangle between Gilligan, the Professor, and May Ann, who was a vacationing pole dancer from Iowa.