Gouldings at Monument Valley has gas as does every small town on the way. Don't worry about gas. If it worries you, definitely top off when you're at 1/2 tank, not 1/4. That's the rule when driving to Alaska!
If you're short on fuel while at Grand Canyon, fuel will be very expensive in the park so just buy what you need.
If you leave Grand Canyon via Hwy 64 east to 89, about a mile south on 89 is Cameron Trading Post. It has fuel and also awesome Indian Tacos (huge) and an excellent all-around restaurant. It also has an extremely nice gift shop with quality, authenic Indian artwork - a good place to purchase a souvenier. Around this whole area you will find many Indians selling their wares along the roadsides. They are the real thing and if you want a jewelry trinket they make nice things, but most non-Indian gift shops sell things from China. :(
Another place on your way to Monument Valley is Tuba City on Hwy 160. Fuel is probably cheaper there and Cameron but still, stop at Cameron - it's a neat place to browse.
Leaving Monument Valley to Moab you'll find gas at every little town - Bluff, Blanding, Monticello. If you can wait until Moab it will be cheaper. City Market in Moab has good prices and the market has excellent veggies and meats.