“But they have not all obeyed the gospel. For Isaiah says, ‘Lord, who has believed what he has heard from us?'” (Rom 10:16).
"in flaming fire, inflicting vengeance on those who do not know God and on those who do not obey the gospel of our Lord Jesus." (2 Thessalonians 1:8)
1 Peter we are similarly told, “For it is time for judgment to begin at the household of God; and if it begins with us, what will be the outcome for those who do not obey the gospel of God?” (1Pe 4:17).
Given the context of these statements in the Bible, it likely along with that carries the richer meaning that the gospel is a royal summons to come under the lordship of Jesus Christ, to ally oneself with him, to follow him. It is the royal announcement that Jesus is the King who offers deliverance to all who, by the grace of God, fly to Him and he is the judge of those who would resist reign of God in Christ.
Wolfgang Musculus' a Reformed theologian of the Reformation had a commentary on 2 Thessalonians . This is his brief explanation of "obedience to the gospel" taken from his exposition of 1:8.