However, you can minimize your risks.
You should have a buyer's agent representing you. Ask the agent to run a CMA on the home before you make an offer on it. That will give you a pretty good idea of what the home is worth. And, significantly, the CMA probably will include the same homes that an appraiser will use when doing the appraisal. So, let's say it's in a "cookie cutter" neighborhood. Your agent comes up with good comps--same neighborhood, sales in the last six months, same or similar style house about the same size--of $400,000, $410,000, and $420,000. So, first, it's likely the home you're considering is worth roughly $410,000. More to the point, if they're good comps, the appraiser will be looking at the same sales and should come to the same conclusion.
Now, it's not always as clear-cut as that. But that's the first step.
On unique homes (historic homes, some homes out in the country), it's far more difficult to come up with comps. I've heard of agents (and investors) preparing a list of comps and presenting them to the appraiser to help justify the value, and to give the appraiser some idea of what the buyer or investor looked at regarding comps. Now, the appraiser is absolutely free to choose other properties and he/she should exercise best judgment in the matter. Still, it doesn't hurt for an agent or investor to present information which supports the contract price.
Sometimes, as you noted, when an appraisal comes in low, the seller will reduce the price. Maybe to the appraisal, maybe not. And sometimes they might not reduce the price at all. That's a risk. However, my experience has been that usually there's some flexibility on the part of the seller.
So, to summarize: Get a current CMA. If there's any concern about finding comps, provide a list of comps to the appraiser. And if the appraisal comes in low, work with the seller to try to persuade him/her to be flexible on price. (A quick argument or two: "Look, Mr. Seller. You're asking $400,000. The appraisal came in at $350,000. Another appraisal is just as likely to come in at $350,000, which means you're just not going to get $400,000 in today's market. However, right now you do have a willing buyer. If you won't come down on price, it may be months before you get another buyer. And when you do, you'll still probably get an appraisal at $350,000. So you won't have gained anything by waiting. If you're interested in selling, let's revisit the price so that you can sell now and get on with your life."
Hope that helps.