There are some really good answers here already but I thought I might add a couple more short points:
when I was a beginner I used to think I knew everything about programming, but as I learned more I realized how difficult this field is
This is called the Dunning-Kruger effect. It is extremely common amongst beginner programmers, and in fact, beginners in many fields.
Most source codes on websites, seen by google chrome seem very messy and unorganized
Did the people who wrote those web sites want you to be able to understand them? Probably not. It is in their interests to have code that is difficult to understand.
it just makes me wonder how can one learn so much.
By specializing. I am an expert in an extraordinarily narrow field: the design and implementation of C# compiler semantic analyzers. If I'd spent fifteen years studying OpenGL or XML or HTML or whatever, I'd be an expert on that and mystified by semantic analyzers. But I didn't, and thus I have only a very basic understanding of OpenGL, XML and HTML.
The question, in a nutshell, is if these things become clearer to a programmer as he advances in his career.
Yes, because you start to see the larger patterns. Take OpenGL for example. You've probably seen a bunch of "API libraries" -- big pieces of related code where the way you interface with the code is by calling a bunch of named functions with particular arguments. And you can get a basic understanding of OpenGL merely from understanding that it is an API.
When you've gotten more experience and seen a bunch of different programming techniques, you realize that seemingly unrelated technologies -- say, OpenGL and LINQ in C# -- have commonalities. Both are APIs where you build workflows that pipe data around, and that you can run optimizers and other transformation on the workflow in rich and interesting ways. Once you have that concept in your box of tools, suddenly it becomes much easier to tap into the full power of any API that uses that pattern.
Do complicated topics as the ones listed above (OpenGL, MySQL, advanced html sites) become easier to read, write and understand as you learn more, or does it just get more complicated as you go by?
They become both easier and more complicated. Easier because, like I said, you start to recognize the larger patterns of thought that underly the design of the system, which enables you to use the system more effectively. More complicated because now you can use the system to solve more complicated problems, and you then start to run into the limitations of the system.
How can you combat this feeling that you're an ant in the programming world and this stuff is the foot about to squash you?
You're an ant; we're all ants. But the stuff isn't the foot that squashes you; it's the world that you get to explore, live in, benefit from, and improve. You, ant, only get to explore a tiny, tiny part of it. Pick a part you like where you can add real value and become an expert in it.