I've have been racking my brain for a long time now about a book which is centered on a house as a gateway for these creatures from a parallel dimension. A young boy stops them by solving a riddle and finding a box/key/something in the garden. I understand it's a very vague description. I read it about 14 years ago.
Actually, I was thinking of The Wastelands by Stephen King from the Dark Tower series. It wasn't completely centered on this, but the character Jake was trying to transport himself from his world to Roland's world via a house with a transdimensional creature as a guardian. He also collects a key from a garden, and a rose. This probably isn't the book your looking for, but that was what popped to mind with your description.
This probably isn't what you're looking for, but your description made me think of Clive Barker's The Thief of Always. The description fits somewhat, though I don't remember if there was an object in the garden that the boy had to find.
Reminds me of part two of the His Dark Materials trilogy by Philip Pullman.
Possibly incorrect, but this bears vague resemblance to Interstellar Piggy, William Sleator. Rather than a riddle, it revolves around winning a scavenger-like game, portions of which take place in a backyard [garden?]. The time frame would be about right; I read Interstellar Pig around 15 years ago myself, though it is a much older book.
Perhaps you got movie and book confused and your thinking of The Gate?