na-adjective, noun which may take the genitive case particle 'no', noun, adverb
just barely; only just; at the very limit; at the last moment
Describes a situation where something is extremely close to a limit, deadline, or threshold, often with a sense of tension or narrow escape. Can be used adverbially, as a noun, or as an adjective with な or の.
電車にぎりぎりで間に合った。
I barely caught the train.
締め切りぎりぎりにレポートを提出した。
I submitted the report at the very last minute before the deadline.
この予算はぎりぎりだ。
This budget is at the absolute limit.
かろうじて means 'barely' or 'with difficulty', emphasizing the effort or struggle to achieve something, whereas ぎりぎり focuses on the closeness to a limit without necessarily implying difficulty.
Onomatopoeic or mimetic word; the exact derivation is uncertain, but the reduplicated form suggests a sense of being at the extreme edge or limit.