I wouldn't say Ramsey kept him out of the team given that Ramsey had a couple of poor seasons recently, more that Arsenal just don't play a formation that suits him; he doesn't play deep and maybe isn't productive enough to be an out and out #10, especially with a player like Ozil around. With us he can play that Lallana role really well, he has the right mix of energy, tenacity, pace and vision to make that position his own over time too, though I'm sure Adam will have something to say about that now he's back.
Originally we had Alexis, Ramsey & Ozil behind Giroud up front, in CM he couldn't win a CM spot as Cazorla always had the other, which needed more defensive nous than the Ox provides. That changed to where Ozil played 10, Ramsey in CM and Oxlade was forced to RWB and LWB. He's a very streaky player, looks amazing one week, shite the other, which caused Wenger to sub him a lot.
In interviews he's said he tends to read a lot about performances, absorbs some of the negativity, and being dropped can't have helped him - were I Klopp I'd keep playing him at #8, let the forwards do their thing, and let his quality on the ball help get the team out of some rough situations even if his positioning can be suspect sometimes.