How are the navaids that are on the airport ground powered?
They use the airport power. The airport and its important equipment have backup power and/or a dedicated power plant (which itself will have backup plans).

This is what the FAA says:


  The FAA recognizes the need to have a reliable power source to operate NAVAIDs, even during utility power outages. Order 6030.20 establishes Continuous Power Airports (CPAs) that provide continuous operations in the event of an area-wide utility failure. Backup power to designated runways at these airports must be able to supply power for at least 4 hours for runway lighting as well as navigation, landing and communication equipment. In addition, FAA policy also requires that power systems used for support of Category (CAT) II and CAT-III operations must be capable of transferring to an alternate source within one second.
  
  Source: AC 150/5300-13A


Basically it's to avoid having to shutdown a major airport. Select airports and runways have to be able to operate.

ICAO recommends the same thing and lists the criteria airports need to meet in Annex 14, section 8.1 Secondary power supply.

For example:


  8.1.5 Recommendation.— Requirements for a secondary power supply should be met by either of the following:
  
  
    — independent public power, which is a source of power supplying the aerodrome service from a substation other than the normal substation through a transmission line following a route different from the normal power supply route and such that the possibility of a simultaneous failure of the normal and independent public power supplies is extremely remote; or
    
    — standby power unit(s), which are engine generators, batteries, etc., from which electric power can be obtained.
  


For navaids in general that are not within an airport, then ICAO Annex 10, Volume I, Part I, Chapter 2 handles the recommendations.