If you haven't done this already. Turn off the breaker to that circuit and then take the face plate "Cover" off the outlet.
Pull the outlet out and check for any loose connections.
If they're back stabbed. Meaning they were inserted into the back of the outlet I'd move them to the screws or have a qualified electrician do this if you're not familiar with how to wire an outlet.
Another problem could be the breaker it'self. Circuit breakers can go bad and trip when they're not supposed too.
I've had that happen to a few of mine. The breakers were pretty old and wouldn't hold the amperage before tripping.
Also check to see if nothing else is on the same circuit as that bathroom outlet. Something else such as an air conditioner running, or a refrigerator kicking on could trip the breaker when you're running your hair dryer.