There are two explanations; it's a small, naturally occurring rectangular gap, and it's a tiny, naturally occurring rectangular gap.
In a statement to Science Live, France-based planetary geologist Nicholas Mangold says it's less than 3 feet (1 meter) high - which he quipped lends itself to the trope of Martains being exceedingly short.
Professor Sanjeev Gupta at Imperial College London told the Daily Telegraph that it's even smaller - measuring roughly 30cm by 45cm. (11" x 17"), and caused by small fractures in the rock.
"There are linear fractures throughout this outcrop, and this is a location where several linear fractures happen to intersect," according to the scientists.
One can also look at the surrounding area via gigapan, where a similar 'cave door' can be seen to the left.
Curiosity is currently climbing an 18,000 foot mountain, Mount Sharp, the crater of which the rover landed in August 2012. The odd photo was taken on Greenheugh Pediment, which notably has rough, 'gator-back' terrain that resembles reptilian scales.
So, the Mars rover photographed what appears to be a door - only it's not a door - near some very odd looking terrain.
As VICE notes, "The door-like formation is just the latest in a series of weird extraterrestrial features spotted over the decades by interplanetary explorers, robotic and human, that have sparked the imaginations of onlookers. Earlier this week, people marveled at new images of claw-like scratches that stretch for hundreds of miles across the western hemisphere of the red planet, which were captured from outer space by the European Space Agency's Mars Express orbiter. These are not the markings of some giant Martian cat in search of a scratching post, but rather ancient fault lines."