Is it ok to take raw aloe vera when you already have gastritis?

Yes. Not only OK, but generally very beneficial. See http://www.naturalnews.com/021858_aloe_vera_gel.html for more on aloe.