I'm going to use a few approximations here but:
To get the same gravity you need the same mass, however gravity also diminishes as a factor of r.
Earth has a mass of 5.97*1024 kg
Earth density is 5.51 g/cm3 with a radius of 6371km.
Assuming by 1/4 of the size you mean 1/4 of the radius then you need to look at the equation for volume of a sphere. The good news is that all the factors except for the radius cancels out. The bad news is that the radius is cubed.
So a sphere with 1/4 the radius has 1/64th of the volume.
However the good news is that because gravity reduces by radius r this does cancel out one factor of the volume.
So to get the same surface gravity you need 16 times the density to give you 1/4 of the mass at 1/4 of the radius.
5.51 * 16 = 88 g/cm3
One of the heaviest materials we have is gold with a density of 19.3g/cm3. Most other materials don't even come close and none are significantly heavier.
So even if your planet was made entirely of solid gold you would have a density only 4 times that of earth. You are 4 times too light. A solid gold planet 1/2 the radius of earth is about as small as you can go.
The only way would be as others have suggested putting something massive in the center such as a neutron star or black hole. It is hard to see how that could be done in a stable way though as you would expect it to eat the planet.
You can't take "neutron star material" and put it in the center of the planet as without the neutron stars gravity to hold it together we can expect it to expand, probably extremely rapidly.