First, try to figure out how to select your boot medium and/or enter your firmware setup utility without GRUB. Unfortunately, this varies a lot from one computer to another. Typically, hitting Esc, Enter, or a function key early in the boot process does the trick -- but sometimes the time window for doing so is quite narrow, so you may end up having to try two or three times before it succeeds. Asking on a forum dedicated to your manufacturer may get you a more specific answer.
Once you can boot from an external medium your options will open up. You can often use Boot Repair from a live disk to get GRUB back to a working state. Alternatively, my own rEFInd boot manager may be useful -- put it on a USB flash drive or CD-R and it should enable you to boot Windows or Linux, even if GRUB is completely messed up.
As a last resort, removing the hard disk and booting without it will often put you into the firmware setup utility, but of course you won't be able to do anything to your OS that way. You might use this to alter the boot options to enable you to use a keypress to enter the EFI's built-in boot manager, though. (Sometimes this option can be disabled or its window of operation narrowed to an unusable level, so adjusting such details can be helpful. "Fast start" options can be to blame for this.) That said, removing or replacing the disk sometimes has the undesirable side effect of removing entries from the EFI's boot manager, which stores data in NVRAM. When the EFI notices that entries point to a disk that's no longer available, the firmware sometimes "helpfully" deletes them, which is obviously not what you want in this case.
You may be able to adjust your OS by moving the disk to another computer that can boot another Linux installation (even the Ubuntu installer in its "try before installing" mode). You'll need to know what you're doing, though, and if you try to adjust the boot process, a slip-up can end up affecting the second computer's main installation, so be careful if you do this!