In the beginning there was Gallery 1.x. Actually, in the beginning Bharat bought a digital camera and thought "wouldn't it be nice if I could put these photos somewhere." But when Gallery 1.x came into being, the developers had no idea what they were doing. They didn't know PHP very well, didn't understand the importance of separating code from content, didn't have a whole lot of database experience, you get the idea. So they started by just writing something that worked, and then slowly building upon it. The end result is Gallery 1.x which works quite nicely but internally is a bit of a mess.
When the developers realized that Gallery was going to be a useful and successful product, they were faced with a choice: fix all the various problems with Gallery 1.x, or start from scratch and build Gallery 2.x which does everything the right way and doesn't have all the various problems that abound in Gallery 1.x. After much discussion, they decided that only a complete rewrite would fix some of the fundamental problems with Gallery 1.x and G2 was born.
Gallery version history (Highlights of changes)