If I simply connect the wire to one of the analog pins on the Arduino, the voltage is only measured against the Arduino's GND and no current flows through my resistor.
That means I can't build my desired circuit with it.
What do I have to do to measure the voltage across a component/resistor with the Arduino similar to a voltmeter?
Just like your digital volt meter, you MUST have your Arduino totally isolated from ANY circuit, that includes make the Arduino run from a battery supply.
Then the Arduino ground becomes one terminal of a volt meter and the analog pin becomes the other volt meter connection.
ENSURE the positive side of the resistor is connected to the analog pin and the more negative side of the resistor is connected to the Arduino ground.
ENSURE the voltage across your resistor is less than or equal to the Arduino power voltage, which is usually 5 volts.
If there is no common ground between your circuit and the Arduino (like if the Arduino is battery powered or if it has its own isolated power supply) you can connect either end of the resistor to the Arduino's "floating" ground. Note that the Arduino only measures positive relative to it's ground. You can't go negative, or greater than +5V relative to the Arduino ground. And watch-out for an unexpected common ground through a USB connection, etc.
Or, you can have a common ground if you connect both ends of the resistor to two different analog inputs and subtract to get the difference.
P.S.
It's OK to use the Arduino to measure voltage or current in a special-dedicated application-situation but it doesn't make a very good general-purpose multimeter.
please understand ALL the voltages you are measuring are ONLY relative to the resistor, not any power supply. Same as when you measure with any other voltmeter.