Generally, you only have to escape one time to make special character considered literal. Sometime you have to do it twice, because your pattern is used by more than one program.
Let disscuss your example:
man gcc | grep \\.
This command is interpreted by two programs,
bash interpreter and
grep. The first escape causes
\ is literal, so the second is pass for
If you escape only one time,
bash will know this dot is literal, and pass
grep see this
., it thinks the dot is special character, not literal
If you escape twice,
bash will pass pattern
grep know that it is a literal dot.