How can 1 BTC gain value in USD if inflation is happening? So, right now, 1 BTC (bitcoin) is worth ≈ 578.25 USD. But, with the inflation of the USD, how can 1 BTC still hold its value at 578.25? Why doesn't it decrease?

Let's set this example:

1 BTC = 1 USD.

Then, the USD loses half of its value; 1 USD is now actually worth 0.50. 

Why won't the BTC lose half of its value?

I guess this principle applies to any currency and I can't seem to grasp the idea.

So, any help will be appreciate. 

I also hope that you can understand my question and if you need clarification, please ask!
I'll try to fit this in an answer. I think you are confusing nominal and relative value. Inflation means that the 'value' of your money depreciates relative to other things. For example, in the year 2000 I could buy a bread for 1 USD. In the year 2015 I can buy a bread for 2 USD. This means that the dollar lost half of it's value relative to bread. But nominal 1 USD is still 1 USD and 1 bread is still 1 bread.

So in your example: today 1 BTC = 578.25 USD. If there is inflation of the USD (the value depreciates), then all else being equal BTC should appreciate against the USD (go up in nominal USD-value). So to work further with the bread-example. If in the year 2000 1 BTC would buy 500 USD then in 2015 1 BTC should buy 1000 USD. So the USD went down in value relative to BTC.

for more information:
https://en.wikipedia.org/wiki/Purchasing_power
http://www.investopedia.com/terms/c/currency-depreciation.asp