As explained in the ところ grammar point, ところ is a noun that is often used to highlight the situation within which a verb is ‘about to’ happen (when that verb appears in its non-past form). However when followed by だった
, it emphasizes that the thing that was ‘about to’ happen never actually eventuated (or that another more important event happened at that moment). This can be translated as ‘to almost (A)’, or ‘to be on the verge of (A)’.
Oh shoot, I was just about to throw away an important document.
I was about to eat a poisonous mushroom, but a friend that is very knowledgeable about mushrooms stopped me.
The verb that ところ is paired with may also be seen grouped with the 助動詞（じょどうし） (auxiliary verb) ない. In this case, it implies that something was ‘about not’ to happen (but then did).
I am so glad that we made this train. I was about to be late for the meet up.
I was about to not be able to pay my rent because I didn't have cash.