The only way you gain a card is if the card specifically says the word "gain" or when you spend money to buy it off of a supply pile. Anything else that results in you having a new card in your deck is not a "gain".

Edit: Total brain fart, thanks commenters!