Rapid urbanization in developing countries is increasingly becoming an important development issue due to its negative effects on poverty and food insecurity in cities. This study investigated the determinants of the food insecurity gap among urban households living in informal settlements in Nairobi, Kenya, and the role of social connectedness and the rural-urban food continuum. Using panel data collected from 385 households using a two-stage cluster sample design, the study applied panel data regression and decomposition models to understand the factors affecting food insecurity access scores and weekly household food consumption expenditure. Descriptive results showed a score of 8.00 for the pooled sample on the household food access scale, with households from other regions having a lower score (7.94) than those from the Western region (8.32). 43 % of households from Western Kenya engaged in farming in rural areas (43 %) and had higher social connectedness (45 %) than households from other regions. The results indicate that dependency ratio, income, savings, social connectedness, rural visits, and dietary knowledge are significant factors impacting food security. Decomposition of levels and change in food insecurity revealed that endowments from the random effects model contributed to reducing the food insecurity gap between households originating from the Western region and those from other regions. The study highlights the importance of considering regional factors and promoting social connectedness and rural-urban linkages in addressing food insecurity in informal urban settlements.