Cook rice according to package directions (day old rice is actually best, so you can skip this step if you have cooked rice on hand)
Heat oil in a large skillet over medium heat. Sauté onion, about 3 minutes.
Add garlic and sauté one more minute.
Add beans, with liquid, and salt and black pepper. Heat through and let simmer for 1-2 min.
Add rice and stir to combine, trying not to smash the beans. Cook until heated through. I like to stir it together and then let it cook, without stirring it for about 3 minutes at a time. This allows the mixture to get little crunchy bits throughout. Stir after 3 minutes and then let it sit an additional 3 minutes. Repeat this, tasting along the way, till the gallo pinto is the consistency you'd like. I cooked mine about 15 minutes total.
Serve with your choice of bananas, avocado, and scrambled eggs.