All etiquette rules apply when you're at a dinner party. Refusing food could be viewed as disrespectful, and fellow guests should understand your reasons if this situation arises.
Inform your host in advance if you have any dietary restrictions. This will save you from providing multiple explanations at the party and committing an etiquette faux pas.
Not alerting the host to your dietary needs beforehand is considered inconsiderate. The host could have prepared dishes that were safe for you if you had informed them in advance.
You should bring an appetite to sample the offerings. If you don't want to sample every dish, polite refusals, accompanied by explanations, are a social necessity.