You haven't given us any specs or info on your Mac or which version of OS X it's running, however, the error you received usually means that you overwrote your Macintosh HD with the Windows 7 installation.
If you just installed Yosemite, can you boot to it by restarting your iMac and holding down your Option key? Your first post appeared as if you just installed Windows 7 with Boot Camp. If you can get into Yosemite as above, see then if you can boot back to Windows 7 again by holding down your Option key and restarting.
If both of those options are working OK, your partitions (both GPT and EFI) are working as they should. It's been several years since I ran Windows 7 from Boot Camp so my memory is a bit rusty... but I believe if you open the Boot Camp Control Panel app while in Windows 7 you can setup the boot sequence.
Or, if you feel like doing something even better, download the free rEFIt or rEFInd applications and setup a dual boot menu. I used rEFIt to dual boot Windows 7 and Snow Leopard.
Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.