Mohit Agarwal had been due to host a Spanish friend at his home in Gurgaon before the complex's housing association said its rulebook forbade single residents from entertaining guests of the opposite sex.
"There was no basis from stopping her to enter my house, except that these guys took it upon themselves to morally police us," Agarwal wrote in a Facebook post which has gone viral.
"And it was super humiliating. With all the shameful insinuations flying around," he wrote.
The unnamed woman from Barcelona, who arrived in India last month to work as an intern for a human rights group, had been intending to stay with Agarwal in The Palm Grove Heights complex in Gurgaon, a business district which is home to several multi-national firms.
The complex is run by the US-based Colliers International real estate management which said the "exclusion" rules were framed by the residents' society.
"We have no role in forming the rules. The residents had previously faced some issue leading to introduction of this rule," estate manager Sanjay Chaudhary told AFP.
Single men and women in India often face scrutiny from landlords who regularly turn down potential tenants because of their unmarried status in what is a largely conservative society.
Some residents claim their children are likely to be led astray by "the bachelors' lifestyles" but it is rare for a residential society to go as far as determining who can come and go from a complex.
In one of the hundreds of Facebook posts written in response to Agarwal's tale, Maria Maciel wrote that the society had acted "outrageously".
"What kind of society (do) we live in? I'm totally shocked with such occurrence. Shame on those people!" Maciel wrote.
Most hotels across India also refuse to accommodate unmarried couples over morality issues.
Last year around 40 unmarried couples were detained from several Mumbai hotels over charges of "indecent behaviour" even though there are no laws that prohibit them from staying together.