Common Misconception; you need to be flexible to do yoga.
Yoga is a pratice that builds muscle strength, flexibility, patience, heart and lung health. So no, you don't need to be flexible to start, because yoga is what helps make you flexible!
Yoga is a repition of movements, poses, and breathing exercises. It's a great form of exercise for beginners in the gym as you use your own body weight to gain control and strength. Practice makes perfect, so while you may find some of the positions difficult at first, over time you will become more flexible and the movements will be much easier.
The slow precision of yoga mixed with deep breathing exercises helps to relax the body even though you're techinically exercising. This way, you're actively keeping your heart healthy in two forms. Firstly, the exercise helps to strengthen the heart, and burn fat that may lead to caridovascular disease. Secondly, the meditative side of yoga, and the deep breathing, helps to physically and mentally relax you, combating the dangerous effects of stress on the heart and brain.
If life's got you stressed, and you can't seem to really get into the gym, try yoga to maintain mental and physical health! Getting started is relatively easy, you don't even neccesarily need an instructor. Just a mat, some good music, and any yoga video you can find on Youtube.