I start getting specific about what I'm going to eat about a week before a race; and what specifically depends on what kind of race and what kind of efforts I'll do. If it's a hilly road race, I'll want to stay lean (but still eating a little more than I would normally), and if it's a flattish time trial I won't be worried about being lean and concentrate more on having max power (so more food, more protein). The main idea is to make sure and give my body all the nutrition it needs to completely recover from training, and enough food that my muscles will totally full of calories. Nice and fat and happy muscles. Kind of swollen, but in a good, strong feeling way.
Hydration is also important, and that begins several days beforehand too. The morning of a race is a little too late to get truly rehydrated, I believe. Two days is plenty of time to get well hydrated. I simply make sure to drink water regularly, particularly at night by leaving a large glass on my night stand that I drink periodically. In those 8 hours of sleep, especially if you sweat or the air con is on all night, you can lose hydration.
What I eat on the morning of a race changes depending on what time the race is and what kind of a race. This was what I ate the morning of the State Championships Time Trial, and I had a 9:25AM start time. The goal was to have good sugar and be very topped off. To do that I like going from complex carbs that take longer to digest and have more protein, and move towards more refined and processed carbs and sugar closer to start time. That way the quick to burn sugars start getting into my system around race start, while the more sustainable energy has already been digested.
6:45AM - Oatmeal with Milk, Cinnamon & Pecans, Orange Juice, Coffee
7:15AM - (On the road) Granola bar, Coffee
8:45AM - (On the trainer starting warm up) Cookie with water
9:15AM - GU with water
10:45AM (Post Race) Mix protein shake with water and drink. Then drink 2-3 bottles of water.
Everyone has their own habits. I know that it takes about an hour to get whatever nutrition you need out of even quickly digestible food, so eating a gel late in a race doesn't really help that much. What you eat beforehand will have a much larger impact. If you start getting weak because your muscles don't have access to enough calories, you're pretty much too late. If you have at least an hour of racing left you can recover from that, but why take the chance of being in that situation?