From what I understand, because Windows didn't offer DOS like direct hardware access, Direct X was created.
You're right that Windows didn't offer DOS like direct hardware access. In fact no operating system with memory protection does.
And yes, DirectX was created to offer a API for accelerated access to certain kinds of hardware. DirectX is a API for accelerated hardware access, not THE (one and only) one.
That means Direct X is the only sure way to achieve direct(ish) hardware access. Am I wrong?
You are wrong because nothing and nobody prevents you from implementing another track for accelerated hardware access. The pieces of software responsible for channeling access to hardware are called drivers. Drivers run in priviledged mode, which means, address space protection doesn't apply to them. That is, because drivers must be able to communicate with hardware.
Drivers communicate with regular programs, the so called User Space through APIs. APIs may be standardized, then may be tightly specified or they may be completely propritary.
DirectX is a specified API, the specification was written down by Microsoft.
OpenGL in a similar way is an API, but instead of having being specified by a single entity it's in some form standardized in collaboration of several contributors.
One example for a propriatary API was Glide by 3Dfx, which in large parts was inspired by OpenGL. In fact there is a compatibility wrapper called "minigl" implementing the subset of OpenGL required for the Half-Life 1 engine to work on 3Dfx/Glide systems.
The GPU vendors' driver developers follow the APIs' specifications, writing drivers for DirectX, OpenGL or some propriatary interface. Each of those APIs gives access to the driver and thus to the hardware. And there may be multiple APIs to a single resource. A driver may implement DirectX 3D, OpenGL and whatever else in parallel and provide them all to user space.
So no, OpenGL is not built on top of DirectX if shipping with a GPU driver. Windows Vista and above ship with a OpenGL-1.4 emulation built on top of DirectX, but that doesn't support shaders, vertex buffer objects and all the other whistles and bells. As soon as you install a GPU driver with OpenGL support, this completely replaces the OpenGL-1.4 emulation with an actual low-level implementation.