In a nutshell, put down the guidebook and start following your senses.
Years ago, my husband and I went to Paris. Clutching our Lonely Planet guide, we made a point of visiting as many of the recommended destinations as possible, only to realize that every other tourist in the city was doing the same thing. One day, we delayed lunch by several hours to go to an apparently-famous felafel joint, then waited forever to get food that failed to satisfy my extremely 'hangry' self. That's when I realized our approach to food and travel needed to change.
I now prefer a mix of spontaneity and careful observation. I've given up on the guide books for restaurant recommendations (but still rely on them for maps and curious historical background), and use online reviews mainly for accommodations. Good food can be found almost anywhere, as long as you know how and where to detect it. Here's how I find it:
1. Pay attention to your surroundings.
Just think of all the times you've probably walked past a great, cute restaurant because your nose was buried in a TripAdvisor map, or the time you've wasted trying to find a five-star coffee shop in a distant suburb that closed the previous year. Instead, I make a point of keeping my eyes up and taking in my surroundings. I make mental notes about which neighbourhoods and places look fun, delicious, and busy, and at what times of day. Then I go back.
2. Ask the locals.
Better than any tourist guide is a conversation with local residents. Whether it's someone you meet or a friend who's from that place, you get the best food recommendations in this way. When I found myself in Istanbul unexpectedly this spring, I immediately messaged a Turkish friend who lives in the U.S. but grew up in the city. She gave me a list of the best baklava, coffee, and barbecue joints, as well as bars with spectacular view of the city. Obviously those were the places I went – and there were hardly any tourists in sight.
3. Sit less, graze more.
My preferred approach while traveling is to fill up on a hotel breakfast (I always book a place with a good meal included) because it takes the pressure off having to find food immediately. Then I graze for most of the day, buying whatever street food or snacks a particular city or country is known for. In Istanbul, this was grilled fish sandwiches, roasted corn on the cob, hot chestnuts, rice-stuffed mussels, sesame breads, and borek pastries. Then I make a more formal plan for dinner, choosing a place to sit down and enjoy the evening meal.
4. Look for holes in the wall.
It's often the least assuming places that have the best food. Rob Walker puts this wonderfully in his book, The Art of Noticing, when he recommends that people "eat somewhere dubious." Choose something that's the opposite of interesting, just to have an experience unlike any other, and perhaps discover a hidden gem.
5. Carry snacks.
Nothing is worse than feeling ravenously hungry and settling for a second-rate dinner because you couldn't hold out for anything better. I travel with trail mix, dried fruit, dark chocolate, and granola bars to stave off the hunger emergencies. (This also saves a ton of money in the airport.)