I wouldn't recommend making an image gallery... Only because i'm making one and finding it somewhat difficult, even after a year of using PHP. Resizing an image requires an outside library, GD (usually) and on top of that only allows you to manipulate PNG, WBMP, and JPG's (perhaps others but definatly not GIF). Plus to make a decent one you need to use a database such as MySQL.
So in essence, there are a lot of easier, and just as fulfilling projects you could start with. My first script was a news script. Although I used mysql for that, you COULD use a text file or something similiar.
How does MySQL work with PHP? Maybe a better question is how can you use PHP without MySQL?
Seriously though, it's a huge compliment to PHP. It might sound easier saving information to a text file rather than a database like MySQL but in actuality, MySQL is easier, in most cases faster, and allows you to do a heck of a lot more than a comma delimited text file.
Imagine a user login script. You write an html page with a form that lets a user type in their login name and password. You post that to a PHP page which then checks to see if those values match a row in your MySQL database. If it matches (meaning if the user exists in the database based on the username and password they entered) then you let them pass. If not, then you tell them to get the hell out. 😉