There are too many restaurants to mention along the track. That said, there is a barrier to protect race watchers and let's not forget the grandstands that are constructed for the event :) ... that might block the view from some of the restaurants. I'd suggest getting there early or later and enjoy your lunch or dinner and then get tickets and head to the grandstand for the thrill of a lifetime ... don't forget your ear plugs!!!
But if you have your heart set on dining during the race, the only 2 locations that might have race views would be Renaissance Baltimore Harborplace Hotel - Watertable Restaurant or Hooters in the Harborplace. As you'd expect, both places are apt to be crowded on race days so plan ahead ! :)