The film is based on the first two parts of "Gulliver's Travels", written by the Irish novelist Jonathan Swift in 1726. The three worlds are England, Lilliput and Brobdingnag. The adventures in Lilliput closely follow the novel. The introduction in England and the adventures in Brobdingnag have very little to do with Swift's novel.
The story takes place in 1699. England is at war with France, and Gulliver's patients have no money to pay for his services. He signs up as the ship's doctor on a voyage to India so that he can afford to buy a house and marry his fiancee, Gwendolyn. When they are at sea Gwendolyn is discovered stowing away below deck. After the ship passes Spain there is a storm that destroys the ship.
Gulliver is washed ashore on an island called Lilliput, where the inhabitants are very small. In the novel they are described as being about 6 inches tall, but in the film they're smaller, closer to 2 inches. At first the Lilliputians fear him, but he wins their trust by working for them. They ask him to defeat their enemy, the island of Blefescu, with whom they are at war over a dispute about how to open eggs. Gulliver tows away the whole naval fleet of Blefescu, but he refuses to kill anyone. This angers the emperor of Lilliput, so he flees in a new boat he has built himself.
Gulliver lands at another undiscovered island called Brobdingnag, on which the inhabitants are 70 feet tall. (That's the height in the novel, they seem bigger in the film). He is captured by a young girl called Glumdalclitch, who takes him to the king. Gwendolyn is waiting for him, having been stranded in Brobdingnag since the storm. The king welcomes him, but it soon becomes apparent that they are prisoners, not allowed to leave the palace. The king's physician is jealous and attempts to have Gulliver burnt, but Glumdalclitch rescues them by putting them in her basket and throwing them in the sea.
Luckily the water currents carry the basket from the South Atlantic back to England. And they live happily ever after.
I greatly enjoyed this film, even more than the book. The novel was written as a political satire, but the film is more of a critique on morals and philosophy. I can relate to Gulliver. In fact, he speaks words that could have come from my own lips. The small people around him are petty, and he tries to lift them up to his own level. The big people around him are bullies, and he has to fight to retain his individuality. For him the most important thing in his life is loving his partner, Gwendolyn, and the second most important thing is doing good to others. The novel actually doesn't have anyone called Gwendolyn, but she is a welcome addition to the film.