Yosemite keeps restarting or going into grey screen
These symptoms imply an issue with your GPU. There is actually an ongoing class-action lawsuit against Apple regarding the AMD GPUs in the 2011 Macs (primarily MacBook Pros). I have seen the issue before in person; my sister's MacBook Pro just encountered it. The symptoms were just as you described: boot chime, Apple logo, spinning loader, grey screen, nothing else. Apple had recently started using lead-free solder for internal components in order to adhere to EU environmental regulations, but the solder is more prone to stress and cracking from rapid heat fluctuation, which can cause the GPU to slowly separate from the logic board. If this is in fact the case, you have 3 options:


Allow Apple to repair it: This will run you $310 if your machine is not under warranty (unlikely, since your machine is 3-4 years old). Apple will replace your entire logic board, which includes the GPU. The only problem with this is that they will be swapping in a logic board with the exact same lead-free solder, which one can consider to be a manufacturing defect. The new board will still likely fail in the future...which is why this issue is big enough to elicit a lawsuit.
Reball: Some 3rd-party computer repair establishments can remove the GPU from the logic board, replace the lead-free solder with lead-based solder, and fix the GPU back onto the logic board. This process is known as "reballing." It is often cheaper than the Apple repair, and more reliable (as long as the repair place is reputable, of course). This would void your warranty, but if you've read this far, yours probably expired already anyway.
Reflow: If you're willing to get your hands dirty, you can use a heat gun to melt the solder back down into place. This is called "reflowing," and is the same process used to fix the "yellow light of death" issue on PS3 consoles.


You can read more about the lawsuit here: http://time.com/3545723/apple-macbook-lawsuit/