You can use the adjective infelicitous when something doesn't work quite right, whether it's a remark or a wrong turn down a dark street or an unfortunate outfit worn to a job interview.
If the ultimate outcome is awkward or unhappy, it's infelicitous. It would be infelicitous to complain about the broken air conditioning in your Mercedes while volunteering at a homeless shelter. In other words, it would be dreadfully inappropriate. Since the 1530s, infelicitous has been used to mean the opposite of felicitous, meaning "happy," which comes from the Latin word for "happiness," felicitas.