The program calling the Linux partition "unallocated" sounds like the Windows Disk Management tool. Microsoft could make it recognize non-Microsoft partition types, but they haven't. It may be that your Ubuntu partition is still there and unharmed.
If that is the case, you may just have to mark the Ubuntu
/boot partition active. The Windows tool will probably refuse to mark any non-Microsoft partition active, so you'll have to use another tool. I recommend booting your system with the Ubuntu install disk and telling it to use rescue mode. I haven't used the Ubuntu rescue mode recently; it may have a menu option for fixing this sort of thing automatically. If not, you will have to get to a command prompt, then say something like this:
# fdisk /dev/sda
Command (m for help): p
...partition list; /boot will be the smallest one you see in all likelihood
Command (m for help): a
Partition number (1-8): 1
/dev/sda1 to be active. That's the most likely one to be
/boot, but isn't necessarily it. You can try rebooting now.
If that didn't work, try repairing your GRUB boot loader.
If that also fails, go back into rescue mode, get into
fdisk and look at the partition table again. If you find a 5 GB partition and it isn't marked as NTFS, Linux, or Linux swap, you may have found the "unallocated" partition. Say it's
/dev/sda3. Then in
Command (m for help): t
Partition number (1-8): 3
Hex code (type L to list codes): 83
Command (m for help): w
/dev/sda3 to partition type 83, which says it contains one of several Linux-compatible filesystems:
ext, XFS, ReiserFS...
Again, try booting.
If that's still not doing it, there are other steps you can take, but we've run out of easy ones. It sounds like this was just a hobby install, so it's probably not worth going to heroic measures to fix it.
In older versions of Ubuntu, you could have chosen to switch to Wubi to reduce the chances of a conflict with Windows. Unfortunately, UEFI conflicts with Wubi and it looks too difficult to work around the problems, so it was removed from Ubuntu, starting in 13.04.