Because of its structural simplicity, you might think that grass evolved a very long time ago, along with the first plants. Interestingly, however, the fossil record shows this is not the case. Grass only shows up in the fossil record about 67 million years ago, in the form of phyoliths (small silica flecks in grass that make it difficult to digest) found in fossilized dinosaur dung. Recently, it was thought that grass only evolved about 55 million years ago, becoming abundant after the Age of the Dinosaurs, which ended in a mass extinction 65 million years ago, but the phytolith finding refutes this.
Land plants in general evolved during the Silurian, about 440 million years ago. These were simple mosses and lichens. All throughout the Mesozoic, dinosaurs consumed various plants, but didn't touch grass until it came into existence at the tail end of the period. If you consider the entire duration of land plants to correspond to an hour, grasses evolved in just the last nine minutes. However, today many ecosystems are dominated by grasslands, which are estimated to cover 20% of the Earth's land area, numerous animals live on grass, and members of the grass family are the most agriculturally and economically important plants in the world.
About 65 million years ago, the world was decimated by a massive asteroid strike that made all the non-avian dinosaurs go extinct. The evolution of grasses is often presented in this context, portrayed as the grass colonizing a world left relatively barren by the mass extinction. However, this is a fallacy, as grass did not become widespread until more than 10 million years after the extinction. Even though 10 million years is not extremely lengthy in evolutionary terms, it is still too long for it to be accurate to present grasses as colonizing in the aftermath of widespread plant extinction. The plant cover was probably largely restored just a few tens of thousands of years after the extinction, if not sooner.
Grass is considered one of the characteristic features of the Cenozoic era, which spans the time from the extinction of the dinosaurs until now. Many mammals display close co-evolution with grass, as special adaptations are required to digest its silica-rich tissues. Ruminants like cows solve the problem using a multi-chambered stomach that slowly digests the grass and actually causes it to ferment. Using this, they can consume large amounts of grass to sustain themselves. Humans, being flexible omnivores, lack the adaptations necessary to digest grass, opting for more calorie-rich food sources such as fruits and meat.