The villagers in the land of Mother Goose gather in the square to celebrate the coming marriage of Tom Piper and Mary Contrary. Barnaby, Mary's evil tutor, hopes to marry the young girl himself and has Tom abducted by two knaves, Gonzorgo and Roderigo, and then sold to a band of Gypsies. Barnaby ruins Mary's source of income by driving her sheep into the Forest of No Return, but Tom returns in time to foil Barnaby's scheme and lead Mary and her brothers and sisters into the forest to retrieve the missing sheep. The friendly trees escort them to Toyland, where the kindly Toymaker puts them to work in return for his help. Meanwhile, Barnaby uses the Toymaker's latest invention to reduce Tom to toy size and tries to force Mary into marrying him. Tom mobilizes the Army of Wooden Soldiers, however, and once more comes to the rescue. The culprit is reduced in size and imprisoned in a bird cage; Tom (now of normal size) and Mary are finally married.