Preflop: calling is barely ok, provided you have good post flop skills and don't overplay your hand. Novice players would be advised to fold this hand to an early position iso-raise.
Flop: I'm check calling here. you only want to check/raise in a spot like this if the stacks are such that you can check raise jam; thereby putting VILLAIN to the tough decision. I would check with the intention of check raise jamming any turn where I improve. The problem with check raising is exactly what happened....you're put to a tough decision when he jams on you. His jam will generally indicate that he can beat top pair (usually sets) and so you're down to a bare flush draw. with those
pot odds and a bare flush draw; you should probably find a fold. Especially because you're in good chip position at your table. no need to jeapordize it all in 1 hand with 1 (non nut) flush draw.
Turn: Had you check/called the flop you both will probably be getting it in on the turn since he actually does have a set and the hand will play out the same....but there is a tiny chance he might fold the turn....but that's not really the point. The point is that vs. his entire range you'll do better this way.