Shop Loot Crate

Chief Miles O'Brien (Colm Meaney) in a dress - Star Trek Art by Brandon Bird

Brandon Bird‘s contribution to the Beam Me Up: Star Trek Art show at Q Pop in LA’s Little Tokyo February 16 – March 1st, 2013.

David in the comments says:

It’s not a dress. Chief O’Brien is wearing a 1st season TNG unisex SKANT – which was intended for both female AND male crew members.

More info from Memory Alpha:

According to the book The Art of Star Trek, “the skirt design for men ‘skant’ was a logical development, given the total equality of the sexes presumed to exist in the 24th century.”

The uniform was used primarily by background actors, though “Encounter at Farpoint” featured both Deanna Troi and Natasha Yar in skant-type uniforms, the latter only briefly. While Troi got a new look entirely for subsequent episodes (according to the Star Trek: The Next Generation Companion the uniform was referred to as the “Space Cheerleader” look), Yar remained in her jumpsuit uniform for the rest of her stay aboard the Enterprise, never donning the skant after the pilot episode. Male crewmembers wearing the skant were only seen in few episodes, “Encounter at Farpoint”, “Haven”, “Conspiracy”, “Where No One Has Gone Before” and “11001001”, though the footage seen in the last episode was re-used from “Where No One Has Gone Before”.

The skant was primarily seen in the first season, appearing only four times, worn with black trousers, in the second season episodes “The Child”, “The Outrageous Okona”, “The Schizoid Man”, and “Samaritan Snare”. After that its final appearance was in the flashbacks during “All Good Things…”