The phrase often conveys disbelief or skepticism in a sarcastic way. You've been working all day? You could have fooled me, seeing how little you've done.
Pro Tip 2/3
Informal
This phrase is casual and typically used in informal conversations. Wow, you knew all the answers? You could have fooled me with all your guessing.
Pro Tip 3/3
Unexpected Reaction
Use it to express that someone's actions or reactions were unexpected. You're scared of mice? You could have fooled me when you picked up that mouse with no problem.