Why does my gear slip when going uphill / standing?
In order of least expensive to most expensive, you either have


a misadjusted derailleur,
a very worn out cassette, or
a crack in your frame.


If you're not noticing any problems shifting under normal circumstances, I'd odds are good that your cassette is worn out and your chain no longer meshes with the cogs correctly.