Foeniculum vulgare contains anethole, which lends star anise its specific flavor. Botanically speaking however, these are quite different!
In gin, we often see the fennel seeds being used for their slight anise-like flavor. Milder and slightly more vegetal, though often without being told, gin drinkers might think of it the flavor note as anise.
Also quite common in absinthe, fennel seeds have become more common, especially in contemporary style gins that emphasize an herbal profile.
1LB dried, fennel seeds for infusions and distillation