If she is getting out of her crib and can't be left alone, then it is time to go to to a big girl bed. ( Personally, we skipped the toddler bed phase and just bought a twin. We just put a body pillow next to our kids and didn't worry about getting rails).
Yes, it will start a whole new set of problems. I think with both of my kids it took about two LONG months before they learned to stay in bed when they were first put in bed. We were just really consistent about putting the kids in bed immediately without talking to them. There were occasionally desperate nights, where my husband would lay with them until they feel asleep. And I have to admit, that as much as I disagreed with starting bad habits, I was really relieved not to be chasing a two year old down the hall. I would come up with a new, shorter routine. I'd drop the extended patting and rubbing. She needs to learn to fall asleep on her own. As hard as it is to hear the crying, remember that she is safe, fed and dry...a little crying won't hurt her.
A gate may help contain her, but it won't stop her from getting up, just from getting out of the room. And you will have to make sure she hasn't figured out how to climb over the gate. After my kids learned how to get out of the crib, it did not take long for them to learn how to scale a baby gate.
I can't help but wonder if she is getting her two year molars. My kids never seemed to be too affected by teething during the day, but at night, they were miserable and it DESTROYED any hope of sleep for anyone.