In Epic Mickey
There are quite a few gremlin wrenches in the first game but only two you have to collect. The first wrench you have to collect belongs to Gremlin Tim. The wrench is in the only teacup in the Spinning Cup Ride that has a Red Stripe on top. Thin out the cup to get the wrench. Give it back to Tim, and he'll use it to fix the Elephant Ride and the Teacup Ride.
The second wrench belongs to Gremlin Prescott. The Telephone stole it and will gladly trade it to Mickey if he completes the "Ostown Phone Network" Quest. Or, Prescott can go into Mickey's House, take his wrench back by force, and dismantle the Telephone if Mickey lets him. Either way, Prescott will use his wrench to fix the bridge leading to the Mickey's Steamroller Projector, which in turn leads to Mickeyjunk Mountain (and Oswald).
In Epic Mickey 2: The Power of Two
Just like in the first game Gremlin wrenches appear when a Gremlin is repairing something. They also appear at the devil side of Rainbow Caverns as cranks to help you get to the other side of the level.