Talk to her, but do not use the word fat. Chubby and overweight are better terms and not as insulting, or at least that is what I think.
Also, is she already over weight or has she simply started to gain weight? If the former then is it just a bit chubbines or is she seriously over weight?
If she's still considered normal weight despite starting to gain some kilos, then I suggest you don't mention the issue and just get her to exercise more and eat healthier. The chances of this happening are higher if you do it together.
If she is already a bit over weight but not alarmingly so then bring it up. Tell her why it bothers you and remember to ask what she thinks about her weight gain; it's her body after all. If she sees no reason to lose weight or change something about her lifestyle, then you need to think if you care about her enough to be with her even if she becomes less physically attractive in your eyes.
If she is seriously over weight then you definitely have to bring it up and perhaps suggest to her that she should see a doctor. Being a bit chubby isn't exactly a huge risk for one's health, but serious overweight definitely is. Aside from the thing about suggesting a doctor, I'd say the same advice applies here as it does above.
But of course, like hale_bopp said, if you are as overweight as your girlfriend or even more so then it would be selfish of you to ask her to lose weight if you won't do the same... maybe this is a bit too vague advice. Could you give us a little more details, like the information if she's already over weight and how seriously and if the same applies to you, too?