Thanks for choosing Just Answer. We are sorry to hear that you are facing issues with your mac. I'm Kumar and I'll assist you further.
It might be a GPU, Display connector or a Display issue.
Let's do a simple test by resetting your NVRAM and PRAM and see if it resolves. Press COMMAND+OPTION+P+R at the time of startup.
Now, if the above does not resolve. Take a screenshot of the of your screen and open it on a Desktop and see if the red Line appears. if the lines appear, its a GPU issue.
However, if the line do not appear, its a display issue. In case of a Mac Book pro Retina Display, display repair is cheaper than a GPU fix. Because GPU fix will need a complete replacement of the Logic Board. However, if you are still under warranty or if you have an extended warranty, you could have everything for free.
Please get back to us in case you need any other assistance.