Varnished surfaces are glossy, making it hard for paint to adhere directly to the surface. Varnish is usually used in combination with wood stain. These stains can bleed through paint over time, creating discolouration and spotty coverage. If you want to paint over a varnished table, you'll need to prep the surface first to avoid these problems.
Place the table on a canvas dust sheet in case of paint spillage.
Sand the table's top and legs with 220-grit sandpaper. This will help remove the topmost layer of glossy varnish for better primer adhesion.
Clean the entire table with a trisodium phosphate (TSP) product to remove the sandpaper dust. The TSP-based product will also cut through any oily residue that may be underneath the varnish coating. These residues, including wood stain or natural wood tannins, are not conducive to painting.
Dry the table with a clean towel.
Prime the table's top and legs with a stain-blocking primer. When you sand off the varnish gloss, you expose any underlying wood stain. These stains bleed through the surface and tarnish your paint. A stain-blocking primer prevents this from happening. A roller makes short work of the tabletop, while a brush is better suited for legs. You don't need to prime or paint the underside, since nobody will see it, but you can if you want to.
Apply a coat of oil-based high-gloss paint to the tabletop using a foam roller. A high-gloss sheen makes the table easier to clean. For the table legs, you can use a matt finish if you prefer. Wait for the first coat to dry and apply additional coats as needed.