I know they were heavily persecuted, but were shop owners required by law to refuse services to them?
OK, the Third Reich inherited a section of the Prussian criminal code, Paragraph 175, which criminalized most male same sex activity. The Weimar period had made some efforts to decriminalizing or making tentative steps to remove the law altogether, but these came to naught. The Third Reich not only prioritized the enforcement of this law, but the legal expansion of Paragraph 175 led to a far greater round of persecutions for men accused of transgressing this sexual more. Whereas prior law tended to treat only anal sex as degenerate sexual activity, the Nazi's expansion and interpretation of this law enfolded all sorts of male sexual activity. Women accused of same sex contact generally were not persecuted under Paragraph 175, but were instead labeled as "asocials." Although the existing judiciary was quite conservative, the Third Reich encouraged harsher sentences and penalties for individuals convicted of harming the health of the Volksgemeinschaft (people's community), and much of the justices followed suit. Convictions for homosexual offenses rose from the hundreds and into the thousands under Nazi rule in the thirties. Moreover, repeated violations of the now-expanded laws led to offenders being labeled habitual criminals, which served as a pretext for a punitive punishment. Those convicted under Paragraph 175 faced not only jail times but larger stigmas associated with criminality as being counter to the social well-being of the Volksgemeinschaft.
So, yes, gay men in Germany were denied services. For one thing, a successful prosecution would lead to a jail term and loss of civil rights a German citizens. The loss of civil rights, especially in wartime, meant these people were low on the pecking order for ration coupons if they were residing in Germany. Some men convicted of these offenses, especially if they were in the armed services, could be assigned to penal battalions in addition to losing their civil rights. Manpower needs sometimes formed a mitigating factor in enforcement of the law, but the initiative was often at the behest of local military authorities. There were cases of people being convicted of homosexual offenses and losing either their businesses or license to operate them. Asocials were often assigned into labor camps or other forms of coerced labor. One disturbing aspect of the state's treatment of asocials was that the women thought to be lesbians tended to be assigned to camp brothels to service guards or other privileged inmates.
Within this context it was near impossible for a German to live as an open homosexual within the Third Reich. Such an individual would have likely been convicted, imprisoned, and lost their civil rights if they were released from prison after serving their sentence. Aryan shop owners in Germany were not supposed to help enemies of the Volksgemeinschaft and there were both legal and extralegal means to enforce this. Moreover, the homophobia of the state often dovetailed with the homophobia among the general population which perceived homosexuality as a deviance counter to the nation's health. One of the common themes from accounts of convicted homosexuals who operated within the Third Reich outside the prison/KZ system is that they needed some sort of third party that could secure them the vital necessities of life.
Sources
Gellately, Robert, and Nathan Stoltzfus. Social Outsiders in Nazi Germany. Princeton, N.J.: Princeton University Press, 2001.
Pine, Lisa. Hitler's "National Community" Society and Culture in Nazi Germany. London: Bloomsbury, 2016.
Snyder, David Raub. Sex Crimes Under the Wehrmacht. Lincoln, Neb: University of Nebraska Press, 2007.