It May Depend on the Creature (and the DM)
The rules are unclear on how high a "creature's space" is, and a DM may have to make a ruling. Unfortunately, "a creature's space" is defined only in a 2-Dimensional sense:Unfortunately, "a creature's space" is defined only in a 2-Dimensional sense: on PHB, p. 191, it is defined entirely in terms of squares (not cubes).
Tiny: 2.5 by 2.5 ft
Small 5 by 5 ft
Medium 5 by 5 ft (etc.)
A DM will have to decide how tall a creature's "space" is when it comes up. This may be based not only on a creature's height (which might vary from about 4 feet for dwarves to about 8 feet for hobgoblins), but also by the space they control. As you stated:
A creature's space is the area in feet that it effectively controls in combat, not an expression of its physical dimensions. A typical Medium creature isn't 5 feet wide, for example, but it does control a space that wide. (Ibid, bold added)
So precisely how tall a "creature's space" is may be different than its height. Different DMs may decide this differently (declaring a 5 foot cube to be every medium creature's "space" or determining space based on height, or however they wish). In some games, the top 5 foot cube of the door might be considered outside of an enemy creature's space (although definitely within their reach, and thus subject to opportunity attacks).
In your campaign, it looks like the DM considers the top part of the door to be within the hostile creature's space. Thus, unless they are using the optional "Tumble" rules (DMG, p. 272, which allows you to make a contested Acrobatics [Dex] check as an action or bonus action to move through an enemy's space), you cannot pass through it.