A lot of people underestimate rats, rats are just like dogs in so many ways (I'm always telling this to my friends and they just roll their eyes at the crazy rat lady). Rat's, just like dogs, can be nippy as baby's, this is because they are tasting and learning about the world around them, so all you need to do is make a squeaky noise and then they now it hurts. For adult rats, as long as you get them from a good breeder: Rat Breeder Red Flags List
- or rescue (the rescue will give you good starter rats), and you treat your rat right your rat will have no reason to bite you. Pet rats are not biters, from my experience, the only rat I had that bit was from a feeder litter (to feed snakes, these are not bred for temperament). If your rat does happen to bite, then yes you can wear gloves until you successfully train it to trust you. To know if a rat is going to bite, you need to be attuned to your rats body language (just like dogs), the most prominent anger/fear signs you should know are if your rats fur is puffed up, or if your rat freezes (just like dogs they get the flight or fight instinct), when you see your rat frozen, staring into space then just leave them until they snap out. Here's an article on rat language: Major Rat Body Language - RattyRat - JoinRats
To sum it up, just like any pet, rats require patience and effort. As long as you make the right decisions, your ratties should love you. If you decide to get the little critters, make sure to do lots of research before doing so.