Gaj remained a knightly property of the House of Griffi from the 13th century. According to the information contained in the "Liber beneficiorum dioecesis Cracoviensis" by Jan Długosz (1470-1480), the settlement measured 10 kmiecy lans and had an inn, a homestead and a manor. At the end of the 16th century, the ownership structure of the town became more complicated, as three owners were recorded in the oldest conscript register to support the Army of the Republic of Poland (1581). The subsequent register from 1680 described the village as noble and church asset held by Krzysztof Ossoliński and local parsons. The inventories from the turn of the 17th and 18th centuries mention, among others, a manor house and manor, as well as an operating brewery, leased by Jews. During the Bar Confederation, a starost of Libertów - Michał Walewski of the Kolumna coat of arms was declared the Marshall of the Uprising, At the beginning of the 19th century, the property in Gaj was owned by the parents of a future general Józef - Andrzej Bem and Agnieszka Gołuchowska, née Gołuchowska. Together with gaining the Galician autonomy in 1867, implementation of elements of communal local government managed by the Commune Head and Council was started. Before the World War I, a farmers’ association and Franciszek Stefczyk Cooperative Savings and Credit Union ("Kasa Stefczyka") were established in the village. After a temporary danger in the autumn of 1914, a military front moved to the east of Cracow. In the interwar period, the following parties were well supported: the Polish People's Party "Piast" and the Polish People's Party - the Left, as well as the Polish Socialist Party's Committee and the National Party With the outbreak of World War II on September 1, 1939, the road leading to Cracow through Gaj filled up with refugees from Orava and Żywiec region. On September 6, Germans took the village, thus beginning occupation that lasted five and a half years. Within the area of the village there were underground units of the Home Army and the Polish Peasants' Battalions. Arms and ammunition depots, as well as communication and underground press distribution points were arranged in private houses. From January 19, 1945, intensive fights were taking place in the area of the village, which changed hands four times. After the end of the war, a hastily established local administration set about helping the victims. The Polish People's Party Association was mainly involved in school matters (purchase of textbooks and necessary repairs). In 1957-1965, the Presidium of the Poviat National Council in Cracow made a large investment in the commune, namely the electrification of the village. The Social Gasification Committee (1971-1977) turned out to be a noticeable initiative of inhabitants. In 1988, solemn commemoration of the 1000th anniversary of Gaj.
Artur Karpacz, "Gaj", [in:] "The Sacred Lesser Poland Heritage", 2024, source: https://sdm.upjp2.edu.pl/en/places/gaj-1