I guess it depends on what one calls "gained". I think Trump is conflating an overall long-term economic impact with the funds released by the Obama administration soon after the deal was struck. I'd further speculate that the conflation is intentional, and that, if you get into a discussion with Obama critics, they will cite that number, not the $400 million we transferred, as what Obama handed over.
So, no, we didn't infuse them with a sudden injection of 150 billion. DavePhD's answer is pretty thorough, I don't have any improvements on that.
In regards to that $400 million, specifically, in case that's part of what is being asked about -
It was Iran's money to begin with
The assets came from a fighter jet purchase that Iran paid for in the waning days of the Shah's reign. He paid for a consignment of military jets, and then was out of office before delivery could be made. The nation of Iran, regardless of how we feel about them politically, paid for a purchase of goods. The United States was legally obligated to deliver the goods, or to refund the money. Given our bellicose and hostile relationship with the new ruling parties, we thought it would be a bad idea to hand them state of the art air force fighter jets, so we cancelled the sale.
However, because of ongoing disputes, we froze their assets until matters could be resolved.
Since Iran was owed the money, once they agreed to stipulations in the agreement, we no longer had any legal recourse for holding the funds
The United States can't arbitrarily hold the property of others on a whim. We had what we felt were legitimate disputes, but since Iran diluted their enriched uranium stockpiles, shut down their enrichment centrifuges and agreed to unprecedented levels of monitoring we no longer had a legal basis for holding the funds.
Iran had the matter pending in the international courts
Since we held their funds for over 45 years, obviously the main bone on contention would be how much interest was owed on assets we held. We were, potentially, on the hook for a lot more if Iran would have prevailed in a court case. The amount we agreed to transfer to them was somewhere in between the amount originally held and the amount they sought in their filings.
This was not something new or unique
There was a special arbitration panel for Iran-US financial disputes that has been grinding away for four decades. A lot of funds flowed from Iran to the US as legal settlements, and quite a bit the other way, as well. I don't hear anyone complaining about the greater sums of money that Iran has paid to US interests as settlements for disputes, so the idea that there are financial settlements and transactions between the nations can't logically be the issue at hand.
This has been going on for decades. I have a pretty clear speculation why it is such a huge deal now, but that's opinion.
$400 Million: Why the US Owed Iran In The First Place (Time Magazine)