I've often heard that before the introduction of potatoes Ireland mostly subsisted on cattle and dairy products because cereal crops didn't grow well there.
How true is this? How much of their diet would have been made up of dairy products? Did they grow any grains themselves, or import any? How common were vegetable gardens?
What features of Ireland's geography or climate made growing cereals difficult?
Nothing about the Irish climate prevents cereal crops from being grown, and Irish people have raised them since Neolithic times. The most important grain was oats, followed by barley. Wheat and rye were grown in smaller quantities, wheat being a particular luxury. It does appear that Irish people ate less bread than some of their western European counterparts, with a greater portion of their oats and barley ending up as porridge. But cereal crops were certainly an important part of the historic Irish diet.
As far as vegetables, Irish people cultivated cabbages, onions, garlic, and parsnips. The only fruits they raised as crops were apples; otherwise, they enjoyed wild berries.
Nonetheless, Irish cuisine was heavily reliant on banbidh ("white foods"), dairy products. There were a stunning variety of milk-based foods, and the Irish considered this to be the central feature of their cuisine. Their meat consumption was not particularly high, however, and mostly limited to pork. In this respect, the Irish were not unlike many other herding cultures worldwide, such as central Asian peoples or many East African cattle herders like the Maasai or Zimbabweans, who consume a lot of dairy products and meat.
Source: A. T. Lucas, "Irish Food Before the Potato" (1960)
/u/Foldweg's answer covers the essentials here! I'm going to wander around the edges and add a few points.
First, the climate in Ireland is absolutely suited to growing cereals - wheat, oats, barley and rye all do fairly well here. The geography, on the other hand, can be more problematic. There are few enough areas in Ireland that are moderately flat and not waterlogged. The south-east corner (Wexford, Waterford, Carlow, parts of Kilkenny) is one, and the plains of Kildare are another, and both of those are historically rich areas, noted for the prevalence of Norman holdings. The Boyne Valley and Golden Vale areas would be other suitable places. Connaught is particularly poor in terms of agricultural land. Ploughing with ard ploughs pulled by oxen is hard enough work as it is, and doing so on sloping, broken, or boggy land is a lot harder. So while there would have been small cereal fields here and there (and fairly widely in the areas I've noted above), livestock was considerably more important in Ireland than in other parts of Europe.
Cattle were foremost among the livestock, although sheep, goats, pigs, chickens, and geese were also kept. You see cattle in folklore, in law texts, all over the place, and the compensation for the killing of a cow would sometimes come close to that for a peasant. The value of cattle was twofold - meat and milk. And the dairy end of things was paramount, for the simple reason that you can get that and still have a cow. There were some circumstances where living cattle were bled, too, the blood being used for food, but that was usually reserved for cases of extreme need. For meat, pork was the centrepiece - pigs don't produce anything else like wool or eggs. Some hunting would also have occurred, mostly for deer and hare, and seabird nests were raided for eggs (gulls will continue to lay if the eggs disappear, for instance).
Dairy, then, was used directly as milk, but also for cream, butter, cheese, buttermilk, and possibly a variety of milk cultures like yoghurt, kefir and piima (I'm using names from other places there to illustrate, not saying they were the same). Cheese was an important thing, and it's worth noting that the Irish valued cheese when neighbouring cultures - the Anglo-Saxons and Norse - did not particularly do so. There are speculations that this is because of movements of cultures and differences in local bio-organisms; the tricks your culture knows to mature cheese in your particular bit of Germany are of no use in England, for instance. Ireland had more continuity among the farming and therefore cheesemaking communities, and therefore likely had better cheese as well as more of it. There's a period text called The Vision of Mac Con Glinne, which makes much of dairy as luxury food.
Seafood is not nearly as common as you would think, Ireland being an island, although fish was certainly eaten. Riverine fish were eaten much more then than they are now - indeed, it's pretty clear that they're not eaten now because they were fished so much in previous eras that there aren't many left. There are a few reasons for this - weather conditions on the Irish coasts, lack of boat-building technologies before the arrival of the Norse, and a cultural association of fish and fasting from fairly early on are some of them.
Other vegetables were grown - onions in particular, as with many early medieval European cultures - and also leeks, cabbages, various green leaves, parsnips, and probably some turnips. Just about every house or dwelling would have had a vegetable garden of some kind; the late 19th century onward is anomalous in history for not having these. Wild berries were also eaten - although there's little trace of this in the literature and records of the era, we see their seeds in archaeological remains. Blackberries, wild strawberries and raspberries, and the Irish fraughan (bilberry, more or less) all feature in that.
If you're interested in further reading, I've appended a whacking great list of sources below!
Sources:
Fergus Kelly, Early Irish Farming: A Study Based Mainly on the Law-Texts of the 7th and 8th Centuries AD
Vera K Niñez, Household Gardens: Theoretical Considerations on an Old Survival Strategy
Alan Hawkes, ‘Fulachtaί fia and Bronze Age cooking in Ireland: reappraising the evidence’ in Proceedings of the Royal Irish Academy. Section C: Archaeology, Celtic Studies, History, Linguistics, Literature, Vol. 115C, Food and Drink in Ireland (2015), pp. 47-77
A.T. Lucas: 'Irish Food Before The Potato', in Gwerin: A Half-Yearly Journal of Folk Life, Volume 3, Issue 2, 1960
William Sayers (1994) 'Diet and fantasy in eleventh‐century Ireland: The vision of Mac Con Glinne', Food and Foodways: Explorations in the History and Culture of Human Nourishment, 6:1, 1-17
William Sayers (1990) 'A cut above: Ration and station in an Irish King's Hall', Food and Foodways: Explorations in the History and Culture of Human Nourishment, 4:2, 89-110
Michael Stanley, Ed Danaher and James Eogan (eds): Dining and dwelling: (Archaeology and the National Roads Authority, Monograph Series 6)
Regina Sexton: ‘Porridge, gruels and breads: the cereal foodstuffs of early historic Ireland’ in Early Medieval Munster: Archaeology, History and Society by Michael A. Monk, John Sheehan
Regina Sexton: ‘The role of fat in the diet of the early Irish penitent’, in Harlan Walker (ed.), The fat of the land: proceedings of the Oxford symposium on food and cookery, 2002 (Bristol: Footwork 2003)
Regina Sexton: ‘Pre-Famine diet’ in John Crowley, William J. Smith and Mike Murphy (eds.) Atlas of the Irish Famine (Cork: Cork University Press 2012)
Regina Sexton: ’Plant Foods in Ireland before AD 1500’, in Matthew Jebb and Colm Crowley (eds.), Secrets of the Irish Landscape, (Cork: Cork University Press, 2013)
Mac Con Iomaire, M. (2004) The history of seafood in Irish cuisine and culture, History Studies, Vol. 5, University of Limerick pp. 61-76.
Cherie N. Peters, “‘He is not entitled to butter’: the diet of peasants and commoners in early medieval Ireland” in Proceedings of the Royal Irish Academy. Section C: Archaeology, Celtic Studies, History, Linguistics, Literature, Vol. 115C, Food and Drink in Ireland (2015), pp. 79-109
Susan Lyons, ‘Food plants, fruits and foreign foodstuffs: the archaeological evidence from urban medieval Ireland’ in Proceedings of the Royal Irish Academy. Section C: Archaeology, Celtic Studies, History, Linguistics, Literature, Vol. 115C, Food and Drink in Ireland (2015), pp. 111-166
Fiona Beglane, 'The social significance of game in the diet of later medieval Ireland' in Proceedings of the Royal Irish Academy. Section C: Archaeology, Celtic Studies, History, Linguistics, Literature, Vol. 115C, Food and Drink in Ireland (2015), pp. 167-196
Catherine Marie O’Sullivan, Hospitality in Medieval Ireland, 900-1500
Maybe out of the historian realm, but is there any connection between the low cereal grain consumption historically and the high rate of Celiac Disease among Irish descendants today?