A doctrine serves no purpose in itself, but it is indispensable to have one if only to avoid being deceived by false doctrines.
Spiritual gifts, to put it as simply as I know how, are the more or less concrete and tangible ways in which the Holy Spirit manifests his presence in and through the individual members of the church.