No, the octopus is not a gastropod. The octopus is a type of animal known as a cephalopod. Octopuses are classified as belonging to the phylum mollusca and the class cephalopoda.
Gastropods are animals such as slugs, snails and whelks. They are a very diverse class of animal and cover over 240,000 different species, making them much more common than the 600-700 types of cephalopod.
The most common cephalopods are octopuses and squid. Unlike gastropods, they do not have shells, but have a distinct 'head' and arms (tentacles). Cephalopods only live in marine environments, while gastropods are far more widespread. The gastropod diet is also more varied, while cephalopods are strict carnivores.
Are They Related?
Only as far as most animal life is related. Although belonging to the same phylum of mollusca, gastropods are no more closely related to cephalopods than man is to fish or reptiles. Man is part of the phylum chordata, but so are whales and falcons, and we differ in many ways from those species.Here's a short film about one type of octopus, the Giant Pacific Octopus: