How To Create The Silky-Smooth Gravy Your Mashed Potatoes Deserve
If your gravy keeps turning out lumpy, it's most likely not the ingredients you're adding, but how you're adding them. Lumps usually come from starch (that is, the flour) hitting liquid the wrong way. When dry flour meets hot broth without having the chance to hydrate evenly, it forms gummy clumps. But if you cook the flour, this problem goes away: This is why seasoned cooks use a roux, a cooked mixture of fat and flour that hydrates that starch evenly before any liquid goes in. An "instant flour" like Wondra is also an option, as it's pre-cooked to avoid this potential pitfall.
When you make that roux, be careful when you're adding the stock; pour it in gently. Pouring in stock all at once can cause lumps of roux to float around, so you're better off whisking the mixture slowly as you're adding stock. The temperature of that stock matters, too: It's best to start with warm stock, as cold stock poured into a hot roux can cause sudden thickening, which encourages clumps.
Also, you may notice the instruction to "whisk" that flour or roux into your gravy. Take this advice literally, as a whisk will help catch bits of flour or roux from all parts of your pan and mix them into the gravy more completely, as opposed to simply stirring the gravy with a spoon. A balloon whisk is generally OK, but you could use a flat whisk if you want to get into the corners or edges of your gravy-making pot.
More pointers, and fixing those lumps once they appear
Maybe you're scared of your starch getting lumpy, so you're playing it safe and not adding too much. Bad idea: If there's a disproportionate amount of fat in your roux or gravy, the fat won't have enough starch to cling to. This results in separated puddles or pockets of grease floating around in your gravy, which is something to avoid. Follow a reputable recipe to get those ratios right.
One more problem: You've made your gravy nice and lump-free, but it's too thin, and you want to add flour to thicken it up. As mentioned, dry flour hitting a hot sauce is one way to get lumps, but in this case, a roux is off the table since you've already made the gravy. Enter the slurry: A mixture of flour or cornstarch with water or broth. Ratios vary, but expect around 1 or 2 tablespoons of starch for a cup of water: Mix the two together separately from your gravy, and once they're smooth, pour it in.
Finally, perhaps your gravy has turned out lumpy, and you're here for advice. You'll basically have to force the lumps out. Whisking aggressively might not really work, but you can try using a sieve. This may strain out some thickener, so you might need to make a slurry to thicken the gravy again. Otherwise, get out your blender, food processor, or immersion blender and put the gravy through it. Sure, it's an extra step that creates more dishes, but it's better than lumpy gravy.