When Scripture talks of gaining salvation "by works" as opposed to "by faith" what I think it is really driving at is the distinction between gaining salvation as a free gift and earning salvation.
When you exercised faith in Christ you were saved, but you didn't earn salvation by believing.
Suppose Bill Gates says to me "Come knock on my door tomorrow afternoon at 3pm and I will give you $10m". And suppose I believe him, knock on his door at 3pm, and he gives me $10m. Did my believing gain the gift$10m? Yes Yes. Did my believing earn the gift$10m? Of course not, it was a gift, I didn't do anything to earn it. So
So it is that believing is not a work, because when we do a work we earn the reward as our right; we have a right to expect the wage.
So though we have to do something to receive salvation (viz, believe) we do not work anything, we cannot work anything to receive salvation. The gift of salvation is vastly greater in value than anything we can ever do to get it.
This, I think, is the sense in which faith is not a work.
I cannot claim that this is either uniquely or specifically a reformed/calvinist perspective: I can only say that I write it as a calvinist.