Dill is a herb that is used to season pickles/gherkins to add extra flavor, which creates the famous dill pickle. Both the seeds and leaves can be used to turn pickles/gherkins into dill pickles.
Therefore gherkins aren’t the same as dill itself. However, gherkins are the same as dill pickles. The difference is that gherkins aren’t seasoned with the dill herb, whereas dill pickles are seasoned with it.